   OpenAL: Playing OggVorbis files without queued buffers
  Hello!I'm new to OpenAL. I want to playback OggVorbis files, but not using queued buffers like in the SDK sample. I got it working, but only if I manually adjust the buffer size. Seems that I'm missing something.. I've included my code (which is basically copy and pasted from the sample). The adjusted line is ulBufferSize *= 12. If I don't do this, only the first split second is being played.Any ideas? Thank you!Constructor:FILE *pOggVorbisFile = fopen( m_strFilename.c_str(), "rb" );fn_ov_open_callbacks( pOggVorbisFile, &sOggVorbisFile, NULL, 0, sCallbacks );psVorbisInfo = fn_ov_info( &sOggVorbisFile, -1 );ulFrequency = psVorbisInfo->rate;ulChannels = psVorbisInfo->channels;switch( ulChannels ){   case 1: ulBufferSize = ulFrequency >> 1; ulBufferSize -= (ulBufferSize % 2); ulFormat = AL_FORMAT_MONO16; break;   case 2: ulBufferSize = ulFrequency; ulBufferSize -= (ulBufferSize % 4); ulFormat = AL_FORMAT_STEREO16; break;   case 4: ulBufferSize = ulFrequency * 2; ulBufferSize -= (ulBufferSize % 8); ulFormat = alGetEnumValue( "AL_FORMAT_QUAD16" ); break;   case 6: ulBufferSize = ulFrequency * 3; ulBufferSize -= (ulBufferSize % 12); ulFormat = alGetEnumValue( "AL_FORMAT_51CHN16" ); break;   default: CLog::Get().Write( LOG_SERVER, "OpenAL: Unsupported format!" ); return;}ulBufferSize *= 12; // <- why do I have to do this?!pDecodeBuffer = (char*)malloc( ulBufferSize );unsigned long ulBytesWritten = DecodeOggVorbis( &sOggVorbisFile, pDecodeBuffer, ulBufferSize, ulChannels );alGenBuffers( 1, &m_uiBuffer );alBufferData( m_uiBuffer, ulFormat, pDecodeBuffer, ulBytesWritten, ulFrequency );alGenSources( 1, &m_uiSource );alSourcei( m_uiSource, AL_BUFFER, m_uiBuffer );Play() function:int iState;alGetSourcei( m_uiSource, AL_SOURCE_STATE, &iState );if( iState == AL_PLAYING )   return;alSourcePlay( m_uiSource );   
  The data buffer needs to be large enough to hold the entire uncompressed version of the audio data. In a case where an OggVorbis file is only 5Mb on disk, a uncompressed version might be 25Mb. Since OpenAL can only handle uncompressed data, the buffer size must be adjusted to fit the entire uncompressed version of the sound data.Since you don't know the final size the uncompressed data will be, you have to guess.The SDK example uses only small buffers because that all it needs to smoothly stream decoded data into them and play them.