[Openal] playing a raw buffer
gmail
angelo70 at gmail.com
Thu Apr 23 06:14:31 PDT 2009
Hello Chris and all,
thanks for the help, anyway i am still stucked on this problem.
It really seems it is a kind of AL problem, even if probably it will not :)
The entire code is quite great, so i try to pseudo-explain better the
problem:
I have a gui app, then a thread, with his own source/albuffers, that
receive data from the network and play the data.
Then, occasionally, my application can pop up a file-manager dialog, and
play, through another thread with another alsource, a recorded file with
raw data.
So here are some test cases i did:
1) Start the app,
open the "rawplay" dialog, play the file, played completely.
2) Start the app,
receive some streamed audio and play it,
stop to play (alSourceStop / unqueue / cleaning buffers)
open the "rawplay" dialog, play the file, the file is played from
about 3/4his size to the end.
palying again the same file, this time it is played completely from
the start, correctly.
3) Start the app,
receive some streamed audio and play it,
stop to play (alSourceStop / unqueue / cleaning buffers)
open the "rawplay" dialog, play the file, the file is played from
about 3/4his size to the end.
close the dialog, receive some other streamed audio and play it,
open the "rawplay" dialog, play the file, the file is played completely.
Is very strange, seems the raw play fail only on the (very-first play)
&& (already received some streaming with the other source/thread).
any help/idea/suggestion is very appreciated.
Angelo
Chris Robinson ha scritto:
> On Wednesday 22 April 2009 11:50:53 am gmail wrote:
>
>> My program anyway have still another source.
>>
>> The problem is that, strange things happen: sometimes the raw file
>> buffer is played fine, sometimes, if i play it after have used the other
>> source, it start to be played from half of its' size. Some time it is
>> not played at all.
>>
>> I am quite sure i am using a bad approach,
>> any help is really appreciated.
>>
>
> Hi.
>
> What OS/lib version are you using? The main thing I can think to look for is,
> if the file stream opened and used previously you should reset it to the
> beginning before starting to read it. It may help to post more of the source
> that's giving problems, because nothing immediately strikes me as wrong from
> what you posted.
>
> And as a side note, from that code snippet, the OpenAL buffer isn't being
> deleted (make sure to do it after the source). :)
> _______________________________________________
> Openal mailing list
> Openal at opensource.creative.com
> http://opensource.creative.com/mailman/listinfo/openal
>
More information about the Openal
mailing list