From bc90443aeb0b98e18787918e3f289af84b9e39d0 Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Wed, 8 Jan 2014 18:07:58 +0400 Subject: [PATCH] Revert "Music playback on OS X >= 10.9 works again. Fixes bug #1041." This reverts commit fc21dd1f3afc44ba13a3c868690964b6b636daf9. --- apps/openmw/mwsound/openal_output.cpp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index 868b4bdbd..4ee754b35 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -316,23 +316,8 @@ void OpenAL_SoundStream::play() throwALerror(); mSamplesQueued = 0; - int srate; - ChannelConfig chans; - SampleType sampleType; - - mDecoder->getInfo(&srate, &chans, &sampleType); - - // Use exactly one sample of silence. - // This is required for OpenAL implementations that don't accept empty buffer data. - // (like one in OS X 10.9) - ALuint sampleSize = framesToBytes(1, chans, sampleType); - std::vector silenceSample(sampleSize); - - if (sampleType == SampleType_UInt8) - std::fill(silenceSample.begin(), silenceSample.end(), 0x80); - - for(ALuint i = 0;i < sNumBuffers;i++) - alBufferData(mBuffers[i], mFormat, &silenceSample[0], sampleSize, mSampleRate); + for(ALuint i = 0;i < sNumBuffers;i++) + alBufferData(mBuffers[i], mFormat, this, 0, mSampleRate); throwALerror(); alSourceQueueBuffers(mSource, sNumBuffers, mBuffers);