]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/sample_openal.hxx
Switch to out own audio format defines
[simgear.git] / simgear / sound / sample_openal.hxx
index 8dc71b0bae066da945f06c005a63316f089d3769..91e2b2ac0c2c375ca667b609c8d86df42b43aa46 100644 (file)
@@ -30,6 +30,7 @@
 #ifndef _SG_SAMPLE_HXX
 #define _SG_SAMPLE_HXX 1
 
+#include <simgear/math/SGMath.hxx>
 #include <simgear/props/props.hxx>
      
 enum {
@@ -40,14 +41,13 @@ enum {
     SG_SAMPLE_8BITS = 8,
     SG_SAMPLE_16BITS = 16,
 
+    SG_SAMPLE_UNCOMPRESSED = 0,
     SG_SAMPLE_COMPRESSED = 256,
 
-    SG_SAMPLE_MONO8        = (SG_SAMPLE_MONO|SG_SAMPLE_8BITS),
-    SG_SAMPLE_MONO16       = (SG_SAMPLE_MONO|SG_SAMPLE_16BITS),
-    SG_SAMPLE_STEREO8      = (SG_SAMPLE_STEREO|SG_SAMPLE_8BITS),
-    SG_SAMPLE_STEREO16     = (SG_SAMPLE_STEREO|SG_SAMPLE_16BITS),
-    SG_SAMPLE_MONO_MULAW   = (SG_SAMPLE_MONO16|SG_SAMPLE_COMPRESSED),
-    SG_SAMPLE_STEREO_MULAW = (SG_SAMPLE_STEREO16|SG_SAMPLE_COMPRESSED)
+    SG_SAMPLE_MONO8    = (SG_SAMPLE_MONO|SG_SAMPLE_8BITS),
+    SG_SAMPLE_MONO16   = (SG_SAMPLE_MONO|SG_SAMPLE_16BITS),
+    SG_SAMPLE_MULAW    = (SG_SAMPLE_MONO|SG_SAMPLE_8BITS|SG_SAMPLE_COMPRESSED),
+    SG_SAMPLE_ADPCM    = (SG_SAMPLE_MONO|SG_SAMPLE_4BITS|SG_SAMPLE_COMPRESSED)
 };
 
 
@@ -61,12 +61,6 @@ public:
     SGSoundSampleInfo();
     ~SGSoundSampleInfo() {}
 
-    /**
-     * Returns the format of this audio sample.
-     * @return SimGear format-id
-     */
-    unsigned int get_format_AL();
-
     /**
      * Returns the format of this audio sample.
      * @return SimGear format-id
@@ -102,9 +96,8 @@ public:
      * @return Data size
      */
     inline size_t get_size() const {
-printf("<-- samples: %i, tracks: %i, bits: %i\n", _samples, _tracks, _bits);
-return (_samples * _tracks * _bits)/8;
-}
+        return (_samples * _tracks * _bits)/8;
+    }
 
 
     /**
@@ -439,8 +432,6 @@ public:
         _tracks = fmt & 0x3; _bits = fmt & 0x1C; _compressed = fmt & 0x100;
     }
 
-    void set_format_AL( int fmt );
-
     /**
      * Set the frequency (in Herz) of this audio sample.
      * @param freq Frequency