home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / immaud.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  4.2 KB  |  104 lines

  1. #ifndef _IMMAUD_
  2.    #define _IMMAUD_
  3. /*******************************************************************************
  4. * FILE NAME:  immaud.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IMMConfigurableAudio                                                     *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #include <immrecrd.hpp>
  19. #include <istring.hpp>
  20. #include <immabuf.hpp>
  21.  
  22. class IMMDeviceSettings;
  23.  
  24. #pragma pack(4)
  25.  
  26.  
  27. class IMMConfigurableAudio : public IMMRecordable {
  28. typedef IMMRecordable
  29.   Inherited;
  30. public:
  31. /*-------------------------- Constructor -------------------------------------*/
  32. virtual
  33.   ~IMMConfigurableAudio();
  34.  
  35. /*----------------------------- Audio Attributes -----------------------------*/
  36. unsigned long
  37.   bytesPerSecond        (CallType call = wait) const,
  38.   bitsPerSample         (CallType call = wait) const,
  39.   blockAlignment        (CallType call = wait) const,
  40.   channels              (CallType call = wait) const,
  41.   samplesPerSecond      (CallType call = wait) const;
  42.  
  43. IMMAudioBuffer::Format
  44.   format                (CallType call = wait) const;
  45.  
  46. virtual IMMConfigurableAudio
  47.   &setBytesPerSecond    (unsigned long averageBytes,
  48.                          CallType call = wait),
  49.   &setBitsPerSample     (unsigned long bitsPerSample,
  50.                          CallType call = wait),
  51.   &setBlockAlignment    (unsigned long alignment,
  52.                          CallType call = wait),
  53.   &setChannels          (unsigned long channels,
  54.                          CallType call = wait),
  55.   &setFormat            (IMMAudioBuffer::Format tag = IMMAudioBuffer::pcm,
  56.                          CallType call = wait),
  57.   &setSamplesPerSecond  (unsigned long samplesPerSecond,
  58.                          CallType call = wait);
  59.  
  60. /*----------------------------- Audio Overrides -----------------------------*/
  61. virtual IMMConfigurableAudio
  62.   &setVolume   (unsigned long volume,
  63.                 AudioChannel channel = all,
  64.                 const IMMMillisecondTime& over = IMMMillisecondTime(),
  65.                 CallType call = wait);
  66. virtual unsigned long
  67.   volume       (AudioChannel channel = left,
  68.                 CallType call = wait) const;
  69.  
  70. protected:
  71. /*------------------------- Constructors -------------------------------------*/
  72.   IMMConfigurableAudio ( const IString& deviceName,
  73.                          Boolean openNow = true,
  74.                          unsigned long instance = 0,
  75.                          Boolean openShareable = true );
  76.   IMMConfigurableAudio ( unsigned long deviceIdentifier,
  77.                          const IString& newAlias = IString() );
  78.  
  79. /*----------------------------- Implementation -------------------------------*/
  80. virtual unsigned long
  81.   translateAudioFlag(unsigned long) const;
  82.  
  83. virtual IMMConfigurableAudio
  84.   &saveDeviceSettings     (),
  85.   &restoreDeviceSettings  (Boolean newRecordMode = false);
  86.  
  87. private:
  88. /*--------------------------------- Private ----------------------------------*/
  89.  
  90. /*--------------------------------- Hidden Functions--------------------------*/
  91.   IMMConfigurableAudio  ( const IMMConfigurableAudio& device );
  92. IMMConfigurableAudio
  93.  &operator=             ( const IMMConfigurableAudio& device );
  94.  
  95. IMMDeviceSettings
  96.   *fDeviceSettings ;
  97.  
  98. }; // IMMConfiguableAudio
  99.  
  100.  
  101. #pragma pack()
  102.  
  103. #endif /* _IMMAUD_ */
  104.