00001 /* 00002 ClanSound, sound mixing library written for ClanLib. 00003 Copyright (c)1998 Magnus Norddahl / ClanSoft. 00004 00005 OSS Documentation can be found at http://www.opensound.com 00006 */ 00007 00008 #ifndef header_oss 00009 #define header_oss 00010 00011 class CL_CSOutput 00012 { 00013 public: 00014 CL_CSOutput(); 00015 ~CL_CSOutput(); 00016 00017 void silence(); 00018 // Called when we have no samples to play - and wants to tell the soundcard 00019 // about this possible event. 00020 00021 bool is_full(); 00022 // Returns true if all fragments are filled with data. 00023 00024 int get_frag_size(); 00025 // Returns the buffer size used by device (returned as num [stereo] samples). 00026 00027 void write_fragment(short *data); 00028 // Writes a fragment to the soundcard. 00029 00030 void wait(); 00031 // Waits until output source isn't full anymore. 00032 00033 private: 00034 int dev_dsp_fd; 00035 int frag_size; 00036 }; 00037 00038 #endif
1.2.6 written by Dimitri van Heesch,
© 1997-2001