00001 #ifndef AUDIOOUTPUTARTS 00002 #define AUDIOOUTPUTARTS 00003 00004 #include <qstring.h> 00005 00006 #define ARTS_PCM_NEW_HW_PARAMS_API 00007 #define ARTS_PCM_NEW_SW_PARAMS_API 00008 #include <artsc.h> 00009 00010 using namespace std; 00011 00012 #include "audiooutputbase.h" 00013 00014 class AudioOutputARTS : public AudioOutputBase 00015 { 00016 public: 00017 AudioOutputARTS(QString main_device, QString passthru_device, 00018 int audio_bits, 00019 int audio_channels, int audio_samplerate, 00020 AudioOutputSource source, 00021 bool set_initial_vol, bool laudio_passthru); 00022 virtual ~AudioOutputARTS(); 00023 00024 // Volume control 00025 virtual int GetVolumeChannel(int channel); // Returns 0-100 00026 virtual void SetVolumeChannel(int channel, int volume); // range 0-100 for vol 00027 00028 protected: 00029 00030 // You need to implement the following functions 00031 virtual bool OpenDevice(void); 00032 virtual void CloseDevice(void); 00033 virtual void WriteAudio(unsigned char *aubuf, int size); 00034 virtual inline int getSpaceOnSoundcard(void); 00035 virtual inline int getBufferedOnSoundcard(void); 00036 00037 00038 00039 private: 00040 arts_stream_t pcm_handle; 00041 int buff_size; 00042 bool can_hw_pause; 00043 }; 00044 00045 #endif // AUDIOOUTPUTARTS
1.5.5