diff options
Diffstat (limited to 'intern/audaspace/intern/AUD_NULLDevice.cpp')
-rw-r--r-- | intern/audaspace/intern/AUD_NULLDevice.cpp | 96 |
1 files changed, 53 insertions, 43 deletions
diff --git a/intern/audaspace/intern/AUD_NULLDevice.cpp b/intern/audaspace/intern/AUD_NULLDevice.cpp index ab824799d88..b7d658aafe6 100644 --- a/intern/audaspace/intern/AUD_NULLDevice.cpp +++ b/intern/audaspace/intern/AUD_NULLDevice.cpp @@ -32,120 +32,130 @@ #include <limits> #include "AUD_NULLDevice.h" -#include "AUD_IReader.h" -#include "AUD_IFactory.h" -AUD_NULLDevice::AUD_NULLDevice() +AUD_NULLDevice::AUD_NULLHandle::AUD_NULLHandle() { } -AUD_DeviceSpecs AUD_NULLDevice::getSpecs() const +bool AUD_NULLDevice::AUD_NULLHandle::pause() { - AUD_DeviceSpecs specs; - specs.channels = AUD_CHANNELS_INVALID; - specs.format = AUD_FORMAT_INVALID; - specs.rate = AUD_RATE_INVALID; - return specs; + return false; } -AUD_Handle* AUD_NULLDevice::play(AUD_IReader* reader, bool keep) +bool AUD_NULLDevice::AUD_NULLHandle::resume() { - return 0; + return false; } -AUD_Handle* AUD_NULLDevice::play(AUD_IFactory* factory, bool keep) +bool AUD_NULLDevice::AUD_NULLHandle::stop() { - return 0; + return false; } -bool AUD_NULLDevice::pause(AUD_Handle* handle) +bool AUD_NULLDevice::AUD_NULLHandle::getKeep() { return false; } -bool AUD_NULLDevice::resume(AUD_Handle* handle) +bool AUD_NULLDevice::AUD_NULLHandle::setKeep(bool keep) { return false; } -bool AUD_NULLDevice::stop(AUD_Handle* handle) +bool AUD_NULLDevice::AUD_NULLHandle::seek(float position) { return false; } -bool AUD_NULLDevice::getKeep(AUD_Handle* handle) +float AUD_NULLDevice::AUD_NULLHandle::getPosition() { - return false; + return 0.0f; } -bool AUD_NULLDevice::setKeep(AUD_Handle* handle, bool keep) +AUD_Status AUD_NULLDevice::AUD_NULLHandle::getStatus() +{ + return AUD_STATUS_INVALID; +} + +float AUD_NULLDevice::AUD_NULLHandle::getVolume() +{ + return 0.0f; +} + +bool AUD_NULLDevice::AUD_NULLHandle::setVolume(float volume) { return false; } -bool AUD_NULLDevice::seek(AUD_Handle* handle, float position) +float AUD_NULLDevice::AUD_NULLHandle::getPitch() +{ + return 0.0f; +} + +bool AUD_NULLDevice::AUD_NULLHandle::setPitch(float pitch) { return false; } -float AUD_NULLDevice::getPosition(AUD_Handle* handle) +int AUD_NULLDevice::AUD_NULLHandle::getLoopCount() { - return std::numeric_limits<float>::quiet_NaN(); + return 0; } -AUD_Status AUD_NULLDevice::getStatus(AUD_Handle* handle) +bool AUD_NULLDevice::AUD_NULLHandle::setLoopCount(int count) { - return AUD_STATUS_INVALID; + return false; } -void AUD_NULLDevice::lock() +bool AUD_NULLDevice::AUD_NULLHandle::setStopCallback(stopCallback callback, void* data) { + return false; } -void AUD_NULLDevice::unlock() +AUD_NULLDevice::AUD_NULLDevice() { } -float AUD_NULLDevice::getVolume() const +AUD_NULLDevice::~AUD_NULLDevice() { - return 0; } -void AUD_NULLDevice::setVolume(float volume) +AUD_DeviceSpecs AUD_NULLDevice::getSpecs() const { + AUD_DeviceSpecs specs; + specs.channels = AUD_CHANNELS_INVALID; + specs.format = AUD_FORMAT_INVALID; + specs.rate = AUD_RATE_INVALID; + return specs; } -float AUD_NULLDevice::getVolume(AUD_Handle* handle) +AUD_Reference<AUD_IHandle> AUD_NULLDevice::play(AUD_Reference<AUD_IReader> reader, bool keep) { - return std::numeric_limits<float>::quiet_NaN(); + return new AUD_NULLHandle(); } -bool AUD_NULLDevice::setVolume(AUD_Handle* handle, float volume) +AUD_Reference<AUD_IHandle> AUD_NULLDevice::play(AUD_Reference<AUD_IFactory> factory, bool keep) { - return false; + return new AUD_NULLHandle(); } -float AUD_NULLDevice::getPitch(AUD_Handle* handle) +void AUD_NULLDevice::stopAll() { - return std::numeric_limits<float>::quiet_NaN(); } -bool AUD_NULLDevice::setPitch(AUD_Handle* handle, float pitch) +void AUD_NULLDevice::lock() { - return false; } -int AUD_NULLDevice::getLoopCount(AUD_Handle* handle) +void AUD_NULLDevice::unlock() { - return 0; } -bool AUD_NULLDevice::setLoopCount(AUD_Handle* handle, int count) +float AUD_NULLDevice::getVolume() const { - return false; + return 0; } -bool AUD_NULLDevice::setStopCallback(AUD_Handle* handle, stopCallback callback, void* data) +void AUD_NULLDevice::setVolume(float volume) { - return false; } |