Blender  V2.59
AUD_NULLDevice.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: AUD_NULLDevice.cpp 35141 2011-02-25 10:21:56Z jesterking $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * Copyright 2009-2011 Jörg Hermann Müller
00007  *
00008  * This file is part of AudaSpace.
00009  *
00010  * Audaspace is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * AudaSpace is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with Audaspace; if not, write to the Free Software Foundation,
00022  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00023  *
00024  * ***** END GPL LICENSE BLOCK *****
00025  */
00026 
00032 #include <limits>
00033 
00034 #include "AUD_NULLDevice.h"
00035 #include "AUD_IReader.h"
00036 #include "AUD_IFactory.h"
00037 
00038 AUD_NULLDevice::AUD_NULLDevice()
00039 {
00040 }
00041 
00042 AUD_DeviceSpecs AUD_NULLDevice::getSpecs() const
00043 {
00044         AUD_DeviceSpecs specs;
00045         specs.channels = AUD_CHANNELS_INVALID;
00046         specs.format = AUD_FORMAT_INVALID;
00047         specs.rate = AUD_RATE_INVALID;
00048         return specs;
00049 }
00050 
00051 AUD_Handle* AUD_NULLDevice::play(AUD_IReader* reader, bool keep)
00052 {
00053         return 0;
00054 }
00055 
00056 AUD_Handle* AUD_NULLDevice::play(AUD_IFactory* factory, bool keep)
00057 {
00058         return 0;
00059 }
00060 
00061 bool AUD_NULLDevice::pause(AUD_Handle* handle)
00062 {
00063         return false;
00064 }
00065 
00066 bool AUD_NULLDevice::resume(AUD_Handle* handle)
00067 {
00068         return false;
00069 }
00070 
00071 bool AUD_NULLDevice::stop(AUD_Handle* handle)
00072 {
00073         return false;
00074 }
00075 
00076 bool AUD_NULLDevice::getKeep(AUD_Handle* handle)
00077 {
00078         return false;
00079 }
00080 
00081 bool AUD_NULLDevice::setKeep(AUD_Handle* handle, bool keep)
00082 {
00083         return false;
00084 }
00085 
00086 bool AUD_NULLDevice::seek(AUD_Handle* handle, float position)
00087 {
00088         return false;
00089 }
00090 
00091 float AUD_NULLDevice::getPosition(AUD_Handle* handle)
00092 {
00093         return std::numeric_limits<float>::quiet_NaN();
00094 }
00095 
00096 AUD_Status AUD_NULLDevice::getStatus(AUD_Handle* handle)
00097 {
00098         return AUD_STATUS_INVALID;
00099 }
00100 
00101 void AUD_NULLDevice::lock()
00102 {
00103 }
00104 
00105 void AUD_NULLDevice::unlock()
00106 {
00107 }
00108 
00109 float AUD_NULLDevice::getVolume() const
00110 {
00111         return 0;
00112 }
00113 
00114 void AUD_NULLDevice::setVolume(float volume)
00115 {
00116 }
00117 
00118 float AUD_NULLDevice::getVolume(AUD_Handle* handle)
00119 {
00120         return std::numeric_limits<float>::quiet_NaN();
00121 }
00122 
00123 bool AUD_NULLDevice::setVolume(AUD_Handle* handle, float volume)
00124 {
00125         return false;
00126 }
00127 
00128 float AUD_NULLDevice::getPitch(AUD_Handle* handle)
00129 {
00130         return std::numeric_limits<float>::quiet_NaN();
00131 }
00132 
00133 bool AUD_NULLDevice::setPitch(AUD_Handle* handle, float pitch)
00134 {
00135         return false;
00136 }
00137 
00138 int AUD_NULLDevice::getLoopCount(AUD_Handle* handle)
00139 {
00140         return 0;
00141 }
00142 
00143 bool AUD_NULLDevice::setLoopCount(AUD_Handle* handle, int count)
00144 {
00145         return false;
00146 }
00147 
00148 bool AUD_NULLDevice::setStopCallback(AUD_Handle* handle, stopCallback callback, void* data)
00149 {
00150         return false;
00151 }