diff options
Diffstat (limited to 'media/audio/audio_util.h')
-rw-r--r-- | media/audio/audio_util.h | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/media/audio/audio_util.h b/media/audio/audio_util.h index a2fa15e..d95a646 100644 --- a/media/audio/audio_util.h +++ b/media/audio/audio_util.h @@ -8,6 +8,7 @@ #include <vector> #include "base/basictypes.h" +#include "media/base/media_export.h" namespace base { class SharedMemory; @@ -30,11 +31,11 @@ namespace media { // formats. // The buffer is modified in-place to avoid memory management, as this // function may be called in performance critical code. -bool AdjustVolume(void* buf, - size_t buflen, - int channels, - int bytes_per_sample, - float volume); +MEDIA_EXPORT bool AdjustVolume(void* buf, + size_t buflen, + int channels, + int bytes_per_sample, + float volume); // FoldChannels() does a software multichannel folding down to stereo. // Channel order is assumed to be 5.1 Dolby standard which is @@ -49,11 +50,11 @@ bool AdjustVolume(void* buf, // volume. // The buffer is modified in-place to avoid memory management, as this // function may be called in performance critical code. -bool FoldChannels(void* buf, - size_t buflen, - int channels, - int bytes_per_sample, - float volume); +MEDIA_EXPORT bool FoldChannels(void* buf, + size_t buflen, + int channels, + int bytes_per_sample, + float volume); // DeinterleaveAudioChannel() takes interleaved audio buffer |source| // of the given |sample_fmt| and |number_of_channels| and extracts @@ -74,23 +75,23 @@ bool DeinterleaveAudioChannel(void* source, // The size of the |source| vector determines the number of channels. // The |destination| buffer is assumed to be large enough to hold the // result. Thus it must be at least size: number_of_frames * source.size() -void InterleaveFloatToInt16(const std::vector<float*>& source, - int16* destination, - size_t number_of_frames); +MEDIA_EXPORT void InterleaveFloatToInt16(const std::vector<float*>& source, + int16* destination, + size_t number_of_frames); // Returns the default audio hardware sample-rate. -double GetAudioHardwareSampleRate(); +MEDIA_EXPORT double GetAudioHardwareSampleRate(); // Functions that handle data buffer passed between processes in the shared // memory. Called on both IPC sides. -uint32 TotalSharedMemorySizeInBytes(uint32 packet_size); -uint32 PacketSizeSizeInBytes(uint32 shared_memory_created_size); -uint32 GetActualDataSizeInBytes(base::SharedMemory* shared_memory, - uint32 shared_memory_size); -void SetActualDataSizeInBytes(base::SharedMemory* shared_memory, - uint32 shared_memory_size, - uint32 actual_data_size); +MEDIA_EXPORT uint32 TotalSharedMemorySizeInBytes(uint32 packet_size); +MEDIA_EXPORT uint32 PacketSizeSizeInBytes(uint32 shared_memory_created_size); +MEDIA_EXPORT uint32 GetActualDataSizeInBytes(base::SharedMemory* shared_memory, + uint32 shared_memory_size); +MEDIA_EXPORT void SetActualDataSizeInBytes(base::SharedMemory* shared_memory, + uint32 shared_memory_size, + uint32 actual_data_size); } // namespace media |