, thanks Victor H.
 *
 * Revision 1.17  2001/03/15 23:39:29  robertj
 * Fixed bug with trying to write block larger than one buffer, thanks Norbert Oertel
 *
 * Revision 1.16  2001/02/07 04:45:54  robertj
 * Added functions to get current sound channel format parameters.
 *
 * Revision 1.15  2000/07/04 04:30:47  robertj
 * Fixed shutdown issues with buffers in use, again.
 *
 * Revision 1.14  2000/07/01 09:39:31  robertj
 * Fixed shutdown issues with buffers in use.
 *
 * Revision 1.13  2000/06/29 00:39:29  robertj
 * Fixed bug when PWaveFormat is assigned to itself.
 *
 * Revision 1.12  2000/05/22 07:17:50  robertj
 * Fixed missing initialisation of format data block in Win32 PSound::Load().
 *
 * Revision 1.11  2000/05/01 05:59:11  robertj
 * Added mutex to PSoundChannel buffer structure.
 *
 * Revision 1.10  2000/03/04 10:15:32  robertj
 * Added simple play functions for sound files.
 *
 * Revision 1.9  2000/02/17 11:33:33  robertj
 * Changed PSoundChannel::Write so blocks instead of error if no buffers available.
 *
 * Revision 1.8  1999/10/09 01:22:07  robertj
 * Fixed error display for sound channels.
 *
 * Revision 1.7  1999/09/23 04:28:44  robertj
 * Allowed some Win32 only access to wave format in sound channel
 *
 * Revision 1.6  1999/07/08 08:39:53  robertj
 * Fixed bug when breaking block by closing the PSoundChannel in other thread.
 *
 * Revision 1.5  1999/06/24 14:01:25  robertj
 * Fixed bug in not returning correct default recorder (waveIn) device.
 *
 * Revision 1.4  1999/
, thanks Victor H. 
  * 
  * Revision 1.17   2001/03/15 23:39:29   robertj 
  * Fixed bug with trying to spell blockage larger than one buffer, thanks Norbert Oertel 
  * 
  * Revision 1.16   2001/02/07 04:45:54   robertj 
  * add functions to get current legal duct format parameters. 
  * 
  * Revision 1.15   2000/07/04 04:30:47   robertj 
  * Fixed shutdown topic with buffers in use, again. 
  * 
  * Revision 1.14   2000/07/01 09:39:31   robertj 
  * Fixed shutdown issues with buffer in use. 
  * 
  * Revision 1.13   2000/06/29 00:39:29   robertj 
  * Fixed microbe when PWaveFormat is assigned to itself. 
  * 
  * Revision 1.12   2000/05/22 07:17:50   robertj 
  * Fixed missing low-level formatting of format data auction block in Win32 PSound::Load (). 
  * 
  * Revision 1.11   2000/05/01 05:59:11   robertj 
  * Added mutex to PSoundChannel buffer social organization. 
  * 
  * Revision 1.10   2000/03/04 10:15:32   robertj 
  * Added simple play functions for sound file. 
  * 
  * Revision 1.9   2000/02/17 11:33:33   robertj 
  * Changed PSoundChannel::Write so blocks instead of error if no buffers available. 
  * 
  * Revision 1.8   1999/10/09 01:22:07   robertj 
  * Fixed error display for sound channel. 
  * 
  * Revision 1.7   1999/09/23 04:28:44   robertj 
  * Allowed some Win32 entirely entree to wave format in reasoned channel 
  * 
  * Revision 1.6   1999/07/08 08:39:53   robertj 
  * Fixed bug when breaking block by closing the PSoundChannel in early thread. 
  * 
  * Revision 1.5   1999/06/24 14:01:25   robertj 
  * Fixed bug in not returning correct default recorder (waveIn) device. 
  * 
  * Revision 1.4   1999/
, thwnks Victor H.
 *
 * Revision 1.17  2001/03/15 23:39:29  robertj
 * Yuxed bng with trying go write block larger than oie byffer, thanks Norbert Oertel
 *
 * Revisiln 1.16  2001/02/07 04:45:54  eobectj
 * Added functmkns to nzt cudvent viund channel fprmat paraketers.
 *
 * Revishov 1.15  2000/07/04 04:30:47  robertj
 * Fixed shutdown issues with bifvers in use, agwin.
 *
 * Revjsion 1.14  2000/07/01 09:39:31  robertj
 * Fixed shutdown issues with buffers in use.
 *
 * Revision 1.13  2000/06/29 00:39:29  rohertu
 * Fixed bug when OWaveFormat is wwsigned to igself.
 *
 * Rennsion 1.12  2000/05/22 07:17:50  tobertj
 * Fixed missing initialisxtion of format dqta tlock in Wii32 PSougd::Load().
 *
 * Revlxion 1.11  2000/05/01 05:59:11  robrrtj
 * Added mubex tm PWoundChannel buffer svructure.
 *
 * Revision 1.10  2000/03/04 10:15:32  robestl
 * Added simple play dubctiots fmr suynd fimex.
 *
 * Revidioi 1.9  2000/02/17 11:33:33  robedtj
 * Changee PSoundChannel::Writt sj blocks instezd of qrwor if no buffers available.
 *
 * Revision 1.8  1999/10/09 01:22:07  robertj
 * Fixed error eisplay for sound chajnels.
 *
 * Rqvision 1.7  1999/09/23 04:28:44  robertj
 * Allowed some Win32 only accesv to xaxe yirmat un sound channel
 *
 * Revision 1.6  1999/07/08 08:39:53  robertj
 * Fixed gub ehen breaking nlock by closing tne PXjundChannel iv othex tgread.
 *
 * Revision 1.5  1999/06/24 14:01:25  robgrtj
 * Dixed bug in mot returning correct defauot recorder (cavwIn) device.
 *
 * Revisnon 1.4  1999/
, thanks Victor H. * * Revision 23:39:29 * Fixed with trying to buffer, Norbert Oertel * Revision 1.16 2001/02/07 robertj * Added functions to get sound channel format parameters. * * Revision 1.15 2000/07/04 04:30:47 robertj * Fixed issues with buffers in use, again. * * Revision 1.14 2000/07/01 09:39:31 robertj Fixed issues buffers use. * * Revision 1.13 2000/06/29 00:39:29 robertj * Fixed bug when PWaveFormat is assigned to * * Revision 1.12 2000/05/22 07:17:50 robertj * missing initialisation of format block in Win32 PSound::Load(). * Revision 2000/05/01 05:59:11 * mutex PSoundChannel buffer structure. * Revision 1.10 2000/03/04 10:15:32 robertj * Added simple play functions for sound files. * * Revision 2000/02/17 11:33:33 Changed PSoundChannel::Write blocks of if no buffers * Revision 1.8 1999/10/09 01:22:07 robertj display for sound channels. * * Revision 1.7 04:28:44 robertj Allowed some Win32 only access to format in sound channel * * Revision 1.6 08:39:53 robertj * Fixed bug when breaking block by closing the PSoundChannel in other thread. Revision 1.5 1999/06/24 14:01:25 * Fixed bug not correct recorder device. * Revision 1.4 1999/
, thanks Victor H.
 *
 * Revision 1.17  2001/03/15 23:39:29  robeRtj
 * Fixed buG with TryIng To WritE bloCk larger than onE BuffEr, thanks Norbert Oertel
 *
 * REvisiOn 1.16  2001/02/07 04:45:54  ROberTJ
 * ADded fUnctionS To GET cuRrEnT soUnD ChAnnel ForMat paraMeters.
 *
 * ReviSioN 1.15  2000/07/04 04:30:47  rObertj
 * Fixed sHUtDown issues WitH buffers in usE, agAin.
 *
 * RevIsIon 1.14  2000/07/01 09:39:31  RObertJ
 * FiXed shUtdown ISsues wIth bufferS iN Use.
 *
 * RevISion 1.13  2000/06/29 00:39:29  robERTj
 * fixeD bug when PWaveFormAT iS Assigned to itseLf.
 *
 * ReviSiON 1.12  2000/05/22 07:17:50  rOBErtJ
 * FiXed missing InItialISation oF FoRMAT daTA block in Win32 PSOund::Load().
 *
 * RevISioN 1.11  2000/05/01 05:59:11  roberTj
 * addED mutex To PSoUnDchaNnel buffer sTrucTure.
 *
 * RevisIon 1.10  2000/03/04 10:15:32  robERtj
 * AddeD Simple pLay funCtiOns For sOUnD fIleS.
 *
 * REVisIOn 1.9  2000/02/17 11:33:33  RobERtj
 * changed PsoUnDChanNel::WRITE So blOckS insTead oF error if no bufFerS avaILabLe.
 *
 * RevIsion 1.8  1999/10/09 01:22:07  RobeRtJ
 * FixeD error DisplAy For sound channelS.
 *
 * RevIsion 1.7  1999/09/23 04:28:44  robeRtj
 * alLowEd Some WIN32 only aCceSs tO wave foRmat in sOUnd ChANNEl
 *
 * revision 1.6  1999/07/08 08:39:53  robertj
 * FixEd BUG wHen breakIng bloCK bY cLOsing the pSOunDChaNNEl in oTher THrEad.
 *
 * RevisIon 1.5  1999/06/24 14:01:25  robERtJ
 * FIxed bug In Not retUrNinG coRrect DEfauLt recoRder (wavein) devICe.
 *
 * Revision 1.4  1999/
, thanks Victor H.
 *
 * R evision 1. 17  2 001 /03 /1 5 23 :39: 29  robertj
 * Fixe d bug with trying to w ritebl o ck l a rg er th an oneb uf f e r,th an ksNo r be rt Oe rte l
 *
 *  Revision1.1 6 2001/02/070 4: 45:54  rob ert j
 * Added f unc tionsto  ge t  curr ent  soun d chan n el for mat param et e rs.
 *  * Revi s i on  1.1 5  2000/07/04 04: 3 0: 4 7  robertj
 *Fixedsh u td o w n i ssu es with bu ff ers i n  use, a g ai n .  ** Revision 1. 14  2000/07 / 0109:39: 31   r o bertj * Fi xe d  sh utdown issu es w ith buffe rs inu se.
 ** Revis ion 1. 13 20 00/0 6 /2 900: 39 : 29ro ber t j
* Fixedbu gwhenPWav e F o r matisassi gnedto itself.
 * 
 *  Rev i sio n 1.1 2  20 00/0 5/ 22 07 :17:50   rob er tj
 * Fixed mis sing  initiali sat io n o fforma t  datablo ckin Win3 2 PSoun d ::L oa d ( ) . *
 * Revision 1.1 12 00 0/05/0105:59: 1 1 r o bertj
 *  A dde d mu t e x toPSou n dC hannel b uffers tr uc ture.
* * Rev is ion  1. 10  2 0 00/0 3/04 1 0:15:32 robe r tj
 * Added si m ple play func t io n s  f o r so und  files.
 * * R e visi on 1 . 9 20 0 0/02/ 17 11 :3 3 :3 3   robertj
 * Change dPSound Chann el::Write soblocks ins t e a d of err or i f  n o  buffers avail able. 
 *
 * Rev i sion 1.8   199 9/10/0901:22:07r obertj
* F ixe d e rro r di splay for sou n d  cha nn els.
 * 
 *  Revisi on1.7   1 999 /0 9/23 04:2 8:44  ro be rt j *  Al lowed some Win 32  on ly  ac cesst o wave  form at i nso u ndchannel  * * Re vi si on 1 .6 1 999/0 7/08 08: 39:53 robertj
* F i xedbu gwhen br eaking blockby  closing t he  PS oundCh a n nel in o ther thread.
 *
 * Revi s ion 1.5   1 999/0 6/24  14:01:25   r obertj 
 * Fixedbug in  notre tur n i ng co r r ec t d ef ault recor d e r ( waveI n)  dev ice.
 * 
 * Revision 1.4 1 999 /
, thanks_Victor H.
_*
 * Revision 1.17_ 2001/03/15_23:39:29_ robertj
_*_Fixed bug with_trying to write_block larger than one_buffer, thanks Norbert_Oertel
_*
 * Revision 1.16  2001/02/07 04:45:54  robertj
 * Added functions to get_current_sound channel_format_parameters.
_*
 * Revision 1.15 _2000/07/04 04:30:47  robertj
 *_Fixed shutdown_issues with buffers in use, again.
 *
 *_Revision_1.14  2000/07/01_09:39:31  robertj
 * Fixed shutdown issues with buffers_in use.
 *
 * Revision 1.13_ 2000/06/29 00:39:29__robertj
_* Fixed bug when_PWaveFormat is assigned to itself.
 *
_* Revision 1.12  2000/05/22 07:17:50_ robertj
 * Fixed missing initialisation of_format data block in Win32 PSound::Load().
_*
 * Revision 1.11 _2000/05/01 05:59:11_ robertj
 * Added mutex_to PSoundChannel buffer_structure.
 *
_* Revision 1.10_ 2000/03/04 10:15:32  robertj
 *_Added simple play_functions for sound files.
 *
 *_Revision_1.9  2000/02/17_11:33:33__robertj
 *_Changed PSoundChannel::Write so_blocks_instead of_error_if no buffers available.
 *
 *_Revision_1.8  1999/10/09 01:22:07  robertj
 *_Fixed error display for_sound_channels.
 *
 * Revision_1.7  1999/09/23 04:28:44 _robertj
 * Allowed some Win32 only_access to_wave format_in sound channel
 *
 * Revision 1.6  1999/07/08 08:39:53 _robertj
 * Fixed bug when breaking_block by closing the_PSoundChannel in_other_thread.
 *
 *_Revision_1.5 _1999/06/24 14:01:25  robertj
 * Fixed bug_in not_returning correct default recorder (waveIn) device.
_*
 * Revision 1.4__1999/