On Monday 25 May 2009 6:53:41 am Niall09 wrote:
> Hi,
>
> I keep trying your example, but &data[(ALuint)(pos*freq) * channels] keeps
> returning 0.
You need to set the variables to the proper values.. data points to the PCM
sound data you want to play, frames is the number of frames (number of samples
divided by the number of channels; note that OpenAL's use of 'sample' actually
means 'frame'), channels is the number of channels, and freq is the sample
rate.
If those values are correct and you meant
(ALuint)(pos*freq) * channels
keeps giving 0, that should only happen if pos is 0.0, meaning the source
isn't playing.
_______________________________________________
Openal-devel mailing list
Openal-devel@...
http://opensource.creative.com/mailman/listinfo/openal-devel