openMSX
LibAOSoundDriver.hh
Go to the documentation of this file.
1 #ifndef LIBAOSOUNDDRIVER_HH
2 #define LIBAOSOUNDDRIVER_HH
3 
4 #include "SoundDriver.hh"
5 #include "noncopyable.hh"
6 
7 struct ao_device;
8 
9 namespace openmsx {
10 
11 class LibAOSoundDriver : public SoundDriver, private noncopyable
12 {
13 public:
14  LibAOSoundDriver(unsigned sampleRate, unsigned bufferSize);
15  virtual ~LibAOSoundDriver();
16 
17  virtual void mute();
18  virtual void unmute();
19 
20  virtual unsigned getFrequency() const;
21  virtual unsigned getSamples() const;
22 
23  virtual void uploadBuffer(short* buffer, unsigned len);
24 
25 private:
26  ao_device* device;
27  unsigned sampleRate;
28  unsigned bufferSize;
29 };
30 
31 } // namespace openmsx
32 
33 #endif // LIBAOSOUNDDRIVER_HH
virtual void mute()
Mute the sound system.
LibAOSoundDriver(unsigned sampleRate, unsigned bufferSize)
virtual unsigned getFrequency() const
Returns the actual sample frequency.
virtual void uploadBuffer(short *buffer, unsigned len)
virtual void unmute()
Unmute the sound system.
Based on boost::noncopyable, see boost documentation: http://www.boost.org/libs/utility.
Definition: noncopyable.hh:12
virtual unsigned getSamples() const
Get the number of samples that should be created 'per fragment'.