void DecoderStateData::DeallocateBufferList() { if(mBufferList) { mBufferCapacityFrames = 0; mBufferList = DeallocateABL(mBufferList); } }
bool OggSpeexDecoder::Close(CFErrorRef */*error*/) { if(!IsOpen()) { LOGGER_WARNING("org.sbooth.AudioEngine.AudioDecoder.OggSpeex", "Close() called on an AudioDecoder that hasn't been opened"); return true; } if(mBufferList) mBufferList = DeallocateABL(mBufferList); // Speex cleanup speex_stereo_state_destroy(mSpeexStereoState), mSpeexStereoState = NULL; speex_decoder_destroy(mSpeexDecoder), mSpeexDecoder = NULL; speex_bits_destroy(&mSpeexBits); // Ogg cleanup ogg_stream_clear(&mOggStreamState); ogg_sync_clear(&mOggSyncState); mIsOpen = false; return true; }