]> git.mxchange.org Git - simgear.git/commitdiff
Properly et frequency, format and buffer size
authorErik Hofman <erik@ehofman.com>
Mon, 27 Jun 2016 11:19:37 +0000 (13:19 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
simgear/sound/sample.cxx

index 2a02e82abce566b9e55491cc8f884854b98d9e71..b201a8b7feb6d45530278e629a2538533c299c00 100644 (file)
@@ -136,6 +136,10 @@ SGSoundSample::SGSoundSample( const unsigned char** data,
 {
     SG_LOG( SG_SOUND, SG_DEBUG, "In memory sounds sample" );
     _data = (unsigned char*)*data; *data = NULL;
+
+    set_frequency(freq);
+    set_format(format);
+    set_size(len);
 }
 
 // constructor
@@ -149,6 +153,10 @@ SGSoundSample::SGSoundSample( void** data, int len, int freq, int format ) :
 {
     SG_LOG( SG_SOUND, SG_DEBUG, "In memory sounds sample" );
     _data = (unsigned char*)*data; *data = NULL;
+
+    set_frequency(freq);
+    set_format(format);
+    set_size(len);
 }