diff --git a/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.cpp b/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.cpp index 300e40d84d..44c48ad774 100644 --- a/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.cpp +++ b/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include "vorbisCodecPlugin.h" #include "OggVorbisFormats.h" @@ -49,9 +48,6 @@ VorbisDecoder::VorbisDecoder() fStartTime = 0; fFrameSize = 0; fOutputBufferSize = 0; - app_info info; - fSoundplayLossage = (be_roster->GetActiveAppInfo(&info) == B_OK) && - (strcmp(info.signature, "application/x-vnd.marcone-soundplay") == 0); } @@ -132,9 +128,6 @@ VorbisDecoder::NegotiateOutputFormat(media_format *ioDecodedFormat) // Be R5 behavior seems to be that we can never fail. If we // don't support the requested format, just return one we do. media_format format = vorbis_decoded_media_format(); - if (fSoundplayLossage) { - format.u.raw_audio.format = media_raw_audio_format::B_AUDIO_SHORT; - } format.u.raw_audio.frame_rate = (float)fInfo.rate; format.u.raw_audio.channel_count = fInfo.channels; format.u.raw_audio.channel_mask = B_CHANNEL_LEFT | (fInfo.channels != 1 ? B_CHANNEL_RIGHT : 0); @@ -212,25 +205,10 @@ VorbisDecoder::Decode(void *buffer, int64 *frameCount, // reduce samples to the amount of samples we will actually consume samples = min_c(samples,out_bytes_needed/fFrameSize); total_samples += samples; - if (fSoundplayLossage) { - for (int sample = 0; sample < samples ; sample++) { - for (int channel = 0; channel < fInfo.channels; channel++) { - int32 thesample = (int32)(pcm[channel][sample] * 32767.0f); - if (thesample > 32767) - *(int16*)out_buffer = 32767; - else if (thesample < -32767) - *(int16*)out_buffer = -32767; - else - *(int16*)out_buffer = thesample; - out_buffer += 2; - } - } - } else { - for (int sample = 0; sample < samples ; sample++) { - for (int channel = 0; channel < fInfo.channels; channel++) { - *((float*)out_buffer) = pcm[channel][sample]; - out_buffer += sizeof(float); - } + for (int sample = 0; sample < samples ; sample++) { + for (int channel = 0; channel < fInfo.channels; channel++) { + *((float*)out_buffer) = pcm[channel][sample]; + out_buffer += sizeof(float); } } out_bytes_needed -= samples * fFrameSize; diff --git a/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.h b/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.h index 9a894b7793..40e61d7da7 100644 --- a/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.h +++ b/src/add-ons/media/plugins/vorbis/vorbisCodecPlugin.h @@ -33,7 +33,6 @@ private: bigtime_t fStartTime; int fFrameSize; int fOutputBufferSize; - bool fSoundplayLossage; };