From 505e5a0b5790e891e25083c1e3e7fea842e76eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 17 Dec 2009 15:56:11 +0000 Subject: [PATCH] * Put the old BeOS R3 media kit symbols back to fix #5135. They are no longer built for GCC4, though. * Deleted the completely unused OldSoundFile.{cpp|h} files. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34688 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/media/Jamfile | 16 +- src/kits/media/OldAudioModule.cpp | 7 + src/kits/media/OldAudioStream.cpp | 7 + src/kits/media/OldBufferStream.cpp | 8 + src/kits/media/OldBufferStreamManager.cpp | 7 + src/kits/media/OldMediaKit.h | 1 - src/kits/media/OldMediaModule.cpp | 7 + src/kits/media/OldSoundFile.cpp | 348 ---------------------- src/kits/media/OldSoundFile.h | 98 ------ src/kits/media/OldSubscriber.cpp | 7 + 10 files changed, 50 insertions(+), 456 deletions(-) delete mode 100644 src/kits/media/OldSoundFile.cpp delete mode 100644 src/kits/media/OldSoundFile.h diff --git a/src/kits/media/Jamfile b/src/kits/media/Jamfile index 7134d1f8c3..0510eab2e1 100644 --- a/src/kits/media/Jamfile +++ b/src/kits/media/Jamfile @@ -60,15 +60,13 @@ SharedLibrary libmedia.so : TimeSourceObjectManager.cpp SoundPlayNode.cpp - # Old (R3) Media Kit - # TODO: removed for now, since it's not implemented anyway - #OldAudioModule.cpp - #OldAudioStream.cpp - #OldBufferStream.cpp - #OldBufferStreamManager.cpp - #OldMediaModule.cpp - #OldSoundFile.cpp - #OldSubscriber.cpp + # Old (R3) Media Kit (built only for GCC2) + OldAudioModule.cpp + OldAudioStream.cpp + OldBufferStream.cpp + OldBufferStreamManager.cpp + OldMediaModule.cpp + OldSubscriber.cpp # Codec Plugin API ChunkCache.cpp diff --git a/src/kits/media/OldAudioModule.cpp b/src/kits/media/OldAudioModule.cpp index 1ea9ba40f0..b6ffdad173 100644 --- a/src/kits/media/OldAudioModule.cpp +++ b/src/kits/media/OldAudioModule.cpp @@ -4,6 +4,12 @@ */ +// This is deprecated API that is not even implemented - no need to export +// it on a GCC4 build (BeIDE needs it to run, though, so it's worthwhile for +// GCC2) +#if __GNUC__ < 3 + + #include "OldAudioModule.h" #include @@ -425,3 +431,4 @@ BADCSource::ReadADC(short *buf, int32 frames, audio_buffer_header *header) } +#endif // __GNUC__ < 3 diff --git a/src/kits/media/OldAudioStream.cpp b/src/kits/media/OldAudioStream.cpp index 72f92f4e5a..f9541db6ca 100644 --- a/src/kits/media/OldAudioStream.cpp +++ b/src/kits/media/OldAudioStream.cpp @@ -4,6 +4,12 @@ */ +// This is deprecated API that is not even implemented - no need to export +// it on a GCC4 build (BeIDE needs it to run, though, so it's worthwhile for +// GCC2) +#if __GNUC__ < 3 + + #include "OldAudioStream.h" #include @@ -264,3 +270,4 @@ BDACStream::_ReservedDACStream3() } +#endif // __GNUC__ < 3 diff --git a/src/kits/media/OldBufferStream.cpp b/src/kits/media/OldBufferStream.cpp index 63cbc4adc9..116393da91 100644 --- a/src/kits/media/OldBufferStream.cpp +++ b/src/kits/media/OldBufferStream.cpp @@ -4,6 +4,12 @@ */ +// This is deprecated API that is not even implemented - no need to export +// it on a GCC4 build (BeIDE needs it to run, though, so it's worthwhile for +// GCC2) +#if __GNUC__ < 3 + + #include "OldBufferStream.h" #include @@ -643,3 +649,5 @@ BBufferStream::FreeAllSubscribers() } +#endif // __GNUC__ < 3 + diff --git a/src/kits/media/OldBufferStreamManager.cpp b/src/kits/media/OldBufferStreamManager.cpp index c09df45f42..96d6c1fff7 100644 --- a/src/kits/media/OldBufferStreamManager.cpp +++ b/src/kits/media/OldBufferStreamManager.cpp @@ -4,6 +4,12 @@ */ +// This is deprecated API that is not even implemented - no need to export +// it on a GCC4 build (BeIDE needs it to run, though, so it's worthwhile for +// GCC2) +#if __GNUC__ < 3 + + #include "OldBufferStreamManager.h" #include @@ -273,3 +279,4 @@ BBufferStreamManager::_ReservedBufferStreamManager3() } +#endif // __GNUC__ < 3 diff --git a/src/kits/media/OldMediaKit.h b/src/kits/media/OldMediaKit.h index bdf177ea19..dcb642c4ea 100644 --- a/src/kits/media/OldMediaKit.h +++ b/src/kits/media/OldMediaKit.h @@ -12,6 +12,5 @@ #include #include #include -#include #include diff --git a/src/kits/media/OldMediaModule.cpp b/src/kits/media/OldMediaModule.cpp index 9294f97291..3d9ec9d7de 100644 --- a/src/kits/media/OldMediaModule.cpp +++ b/src/kits/media/OldMediaModule.cpp @@ -4,6 +4,12 @@ */ +// This is deprecated API that is not even implemented - no need to export +// it on a GCC4 build (BeIDE needs it to run, though, so it's worthwhile for +// GCC2) +#if __GNUC__ < 3 + + #include "OldMediaModule.h" #include @@ -665,3 +671,4 @@ BMediaChannel::StreamChanged() } +#endif // __GNUC__ < 3 diff --git a/src/kits/media/OldSoundFile.cpp b/src/kits/media/OldSoundFile.cpp deleted file mode 100644 index b891aac5ec..0000000000 --- a/src/kits/media/OldSoundFile.cpp +++ /dev/null @@ -1,348 +0,0 @@ -//OldSoundFile.h is replaced by SoundFile.h -//OldSoundFile.cpp is replaced by SoundFile.cpp - -#if 0 - -/*********************************************************************** - * AUTHOR: Marcus Overhagen - * FILE: OldSoundFile.cpp - * DESCR: - ***********************************************************************/ -#include -#include "debug.h" - -/************************************************************* - * public BSoundFile - *************************************************************/ - -BSoundFile::BSoundFile() -{ - UNIMPLEMENTED(); -} - - -BSoundFile::BSoundFile(const entry_ref *ref, - uint32 open_mode) -{ - UNIMPLEMENTED(); -} - - -BSoundFile::~BSoundFile() -{ - UNIMPLEMENTED(); -} - - -status_t -BSoundFile::InitCheck() const -{ - UNIMPLEMENTED(); - - return B_OK; -} - - -status_t -BSoundFile::SetTo(const entry_ref *ref, - uint32 open_mode) -{ - UNIMPLEMENTED(); - - return B_ERROR; -} - - -int32 -BSoundFile::FileFormat() const -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::SamplingRate() const -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::CountChannels() const -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::SampleSize() const -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::ByteOrder() const -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::SampleFormat() const -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::FrameSize() const -{ - UNIMPLEMENTED(); - - return 0; -} - - -off_t -BSoundFile::CountFrames() const -{ - UNIMPLEMENTED(); - off_t dummy; - - return dummy; -} - - -bool -BSoundFile::IsCompressed() const -{ - UNIMPLEMENTED(); - - return false; -} - - -int32 -BSoundFile::CompressionType() const -{ - UNIMPLEMENTED(); - - return 0; -} - - -char * -BSoundFile::CompressionName() const -{ - UNIMPLEMENTED(); - return NULL; -} - - -int32 -BSoundFile::SetFileFormat(int32 format) -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::SetSamplingRate(int32 fps) -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::SetChannelCount(int32 spf) -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::SetSampleSize(int32 bps) -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::SetByteOrder(int32 bord) -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::SetSampleFormat(int32 fmt) -{ - UNIMPLEMENTED(); - - return 0; -} - - -int32 -BSoundFile::SetCompressionType(int32 type) -{ - UNIMPLEMENTED(); - - return 0; -} - - -char * -BSoundFile::SetCompressionName(char *name) -{ - UNIMPLEMENTED(); - return NULL; -} - - -bool -BSoundFile::SetIsCompressed(bool tf) -{ - UNIMPLEMENTED(); - - return false; -} - - -off_t -BSoundFile::SetDataLocation(off_t offset) -{ - UNIMPLEMENTED(); - off_t dummy; - - return dummy; -} - - -off_t -BSoundFile::SetFrameCount(off_t count) -{ - UNIMPLEMENTED(); - off_t dummy; - - return dummy; -} - - -size_t -BSoundFile::ReadFrames(char *buf, - size_t count) -{ - UNIMPLEMENTED(); - size_t dummy; - - return dummy; -} - - -size_t -BSoundFile::WriteFrames(char *buf, - size_t count) -{ - UNIMPLEMENTED(); - size_t dummy; - - return dummy; -} - - -off_t -BSoundFile::SeekToFrame(off_t n) -{ - UNIMPLEMENTED(); - off_t dummy; - - return dummy; -} - - -off_t -BSoundFile::FrameIndex() const -{ - UNIMPLEMENTED(); - off_t dummy; - - return dummy; -} - - -off_t -BSoundFile::FramesRemaining() const -{ - UNIMPLEMENTED(); - off_t dummy; - - return dummy; -} - -/************************************************************* - * private BSoundFile - *************************************************************/ - - -void -BSoundFile::_ReservedSoundFile1() -{ - UNIMPLEMENTED(); -} - - -void -BSoundFile::_ReservedSoundFile2() -{ - UNIMPLEMENTED(); -} - - -void -BSoundFile::_ReservedSoundFile3() -{ - UNIMPLEMENTED(); -} - - -void -BSoundFile::_init_raw_stats() -{ - UNIMPLEMENTED(); -} - - -status_t -BSoundFile::_ref_to_file(const entry_ref *ref) -{ - UNIMPLEMENTED(); - - return B_ERROR; -} - - -#endif diff --git a/src/kits/media/OldSoundFile.h b/src/kits/media/OldSoundFile.h deleted file mode 100644 index cb413a62aa..0000000000 --- a/src/kits/media/OldSoundFile.h +++ /dev/null @@ -1,98 +0,0 @@ -/****************************************************************************** - - File: SoundFile.h - - Description: Interface for a format-insensitive sound file object. - - Copyright 1995-97, Be Incorporated - -******************************************************************************/ - - -#ifndef _SOUND_FILE_H -#define _SOUND_FILE_H - -#include -#include -#include - -enum // sound_format -{ B_UNKNOWN_FILE, - B_AIFF_FILE, - B_WAVE_FILE, - B_UNIX_FILE }; - -class BSoundFile { - -public: - BSoundFile(); - BSoundFile(const entry_ref *ref, - uint32 open_mode); - virtual ~BSoundFile(); - - status_t InitCheck() const; - - status_t SetTo(const entry_ref *ref, uint32 open_mode); - - int32 FileFormat() const; - int32 SamplingRate() const; - int32 CountChannels() const; - int32 SampleSize() const; - int32 ByteOrder() const; - int32 SampleFormat() const; - int32 FrameSize() const; - off_t CountFrames() const; - - bool IsCompressed() const; - int32 CompressionType() const; - char *CompressionName() const; - - virtual int32 SetFileFormat(int32 format); - virtual int32 SetSamplingRate(int32 fps); - virtual int32 SetChannelCount(int32 spf); - virtual int32 SetSampleSize(int32 bps); - virtual int32 SetByteOrder(int32 bord); - virtual int32 SetSampleFormat(int32 fmt); - virtual int32 SetCompressionType(int32 type); - virtual char *SetCompressionName(char *name); - virtual bool SetIsCompressed(bool tf); - virtual off_t SetDataLocation(off_t offset); - virtual off_t SetFrameCount(off_t count); - - size_t ReadFrames(char *buf, size_t count); - size_t WriteFrames(char *buf, size_t count); - virtual off_t SeekToFrame(off_t n); - off_t FrameIndex() const; - off_t FramesRemaining() const; - - BFile *fSoundFile; - -private: - -virtual void _ReservedSoundFile1(); -virtual void _ReservedSoundFile2(); -virtual void _ReservedSoundFile3(); - - int32 fFileFormat; - int32 fSamplingRate; - int32 fChannelCount; - int32 fSampleSize; - int32 fByteOrder; - int32 fSampleFormat; - - off_t fByteOffset; /* offset to first sample */ - - off_t fFrameCount; - off_t fFrameIndex; - - bool fIsCompressed; - int32 fCompressionType; - char *fCompressionName; - status_t fCStatus; - void _init_raw_stats(); - status_t _ref_to_file(const entry_ref *ref); - uint32 _reserved[4]; -}; - - -#endif // #ifndef _SOUND_FILE_H diff --git a/src/kits/media/OldSubscriber.cpp b/src/kits/media/OldSubscriber.cpp index 2fea36a251..542c714dcb 100644 --- a/src/kits/media/OldSubscriber.cpp +++ b/src/kits/media/OldSubscriber.cpp @@ -4,6 +4,12 @@ */ +// This is deprecated API that is not even implemented - no need to export +// it on a GCC4 build (BeIDE needs it to run, though, so it's worthwhile for +// GCC2) +#if __GNUC__ < 3 + + #include "OldSubscriber.h" #include "debug.h" @@ -161,3 +167,4 @@ BSubscriber::_ReservedSubscriber3() } +#endif // __GNUC__ < 3