home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wvis0626.zip / warpvision_20020626.zip / audio / dart.h < prev   
C/C++ Source or Header  |  2002-06-21  |  2KB  |  68 lines

  1. /*
  2.     Direct Audio Interface library for OS/2
  3.     Copyright (C) 1998 by Andrew Zabolotny <bit@eltech.ru>
  4.  
  5.     This library is free software; you can redistribute it and/or
  6.     modify it under the terms of the GNU Library General Public
  7.     License as published by the Free Software Foundation; either
  8.     version 2 of the License, or (at your option) any later version.
  9.  
  10.     This library is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.     Library General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU Library General Public
  16.     License along with this library; if not, write to the Free
  17.     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19.     Modified by Alex Strelnikov
  20. */
  21.  
  22. #ifndef __DART_H__
  23. #define __DART_H__
  24.  
  25.  
  26. typedef size_t (*dartInputCallback) (void *Buffer, size_t BufferSize);
  27.  
  28.  
  29. typedef struct DartStruct
  30. {
  31.     int                Stopped;
  32.     int                Paused;
  33.     int                WaitStreamEnd;
  34.     int                BytesPlayed;
  35.     int                BufLen;
  36.     int                BufferCount;
  37.     int                ResampleFlg;
  38.     LONG               SeekPosition;
  39.     BOOL               Shareable;
  40.  
  41.     USHORT             DeviceID;
  42.     MCI_MIX_BUFFER     *MixBuffers;
  43.     MCI_MIXSETUP_PARMS MixSetupParms;
  44.     MCI_BUFFER_PARMS   BufferParms;
  45.     CHAR               ErrorCode[CCHMAXPATH];
  46.  
  47.     dartInputCallback  InputCallback;
  48.  
  49. } DartStruct;
  50.  
  51.  
  52. int dart_init(int DeviceIndex, int BitsPerSample, int SamplingRate,
  53.               int DataFormat, int Channels, int Buffers,
  54.               dartInputCallback Callback);
  55. int dart_close(void);
  56. int dart_play(void);
  57. void dart_stop(void);
  58. void dart_pause(void);
  59. void dart_resume(void);
  60. ULONG dart_get_pos(void);
  61. void dart_set_pos(ULONG new_position);
  62. int dart_error(APIRET rc);
  63. void dart_set_sound_state(BOOL state);
  64. void dart_set_volume(ULONG vol);
  65. USHORT dart_get_volume(void);
  66.  
  67. #endif
  68.