[Openal-devel] another AL_PAUSED strange behavior (Win32HW)
dpeacock at creativelabs.com
dpeacock at creativelabs.com
Mon Nov 28 12:20:41 PST 2005
Hi,
This bug should also be fixed in the latest Windows code in CVS. Basically
there just needed to be a special case for changing a Paused Source into a
Stopped Source.
Dan
Notice
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or
any action taken by you in reliance on it, is prohibited and may be
unlawful. If you have received this message in error, please delete it
and contact the sender immediately. Thank you.
rage2050
<rage2050 at mail.go
o.ne.jp> To
Sent by: openal-devel at opensource.creative.co
openal-devel-admi m
n at opensource.crea cc
tive.com
Subject
[Openal-devel] another AL_PAUSED
11/25/2005 01:51 strange behavior (Win32HW)
AM
In Win32 Generic Hardware, I tried another code.
1. Init a streaming source.
2. Play, pause, and stop the source.
3. Clear the queue. Requeue with buffers.
4. Play the source again.
I can hear something like, head of data is played 2 times.
I'll try to hack alSource.c.
Does anyone have more info about this?
//---------------------------------------------------------------------------
void test02()
{
alutInit(&argc, argv);
ALuint src, buf[0x10];
#define elemof(a) (sizeof(a)/sizeof(*a))
static ALfloat FREQ[] = {
261.626, 277.183, 293.665, 311.127, 329.628, 349.228,
369.994, 391.995, 415.305, 440.000, 466.164, 493.883,
523.252,
};
static int KEY[] = {
//C D E F G A B C' C E G E C E G E C E G E C
0,2,4,5,7,9,11,12, 0,4,7,4,0,4,7,4,0,4,7,4,0,
};
for (int i=0; i<0x10; i++)
{
int k = KEY[i%elemof(KEY)];
ALfloat f = FREQ[k%elemof(FREQ)];
buf[i] = alutCreateBufferWaveform(ALUT_WAVEFORM_SINE, f, 0, 0.4f);
}
alGenSources( 1, &src );
alSourceQueueBuffers( src, 0x10, buf );
alSourcePlay(src);
alutMicroSleep(100*1000);
alSourcePause(src);
alSourceStop(src);
alSourcei(src, AL_BUFFER, 0);
alSourceQueueBuffers( src, 0x10, buf );
alutMicroSleep(500*1000);
alSourcePlay(src);
alutMicroSleep(4000*1000);
alSourceStop(src);
alDeleteSources( 1, &src );
alDeleteBuffers( 0x10, buf );
alutExit();
}
/** @name rage2050
@email rage2050 at mail.goo.ne.jp
@url http://hp.vector.co.jp/authors/VA024832/
*/
_______________________________________________
openal-devel mailing list
openal-devel at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal-devel
ForwardSourceID:NT0002A832
More information about the Openal-devel
mailing list