Package: transcend / 0.3.dfsg2-3

03_portaudio.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Author: Barry deFreese <bdefreese@debian.org>
Description: Build with portaudio19.
--- a/Transcend/game/SoundPlayer.h
+++ b/Transcend/game/SoundPlayer.h
@@ -204,7 +204,7 @@
         double mMusicLoudness;
         
         
-        PortAudioStream *mAudioStream;
+        PaStream *mAudioStream;
 
         // realtime sounds that should be mixed into the next to-speaker call
         SimpleVector<PlayableSound *> *mRealtimeSounds;
--- a/Transcend/game/SoundPlayer.cpp
+++ b/Transcend/game/SoundPlayer.cpp
@@ -47,9 +47,11 @@
 
 
 // callback passed into portaudio
-static int portaudioCallback( void *inputBuffer, void *outputBuffer,
+int portaudioCallback( const void *inputBuffer, void *outputBuffer,
                               unsigned long framesPerBuffer,
-                              PaTimestamp outTime, void *userData ) {
+                              const PaStreamCallbackTimeInfo *outTime,
+                              PaStreamCallbackFlags statusFlags,
+                              void *userData ) {
 
 
     SoundPlayer *player = (SoundPlayer *)userData;
@@ -147,21 +149,13 @@
 
     if( error == paNoError ) {
     
-        error = Pa_OpenStream(
+        error = Pa_OpenDefaultStream(
             &mAudioStream,
-            paNoDevice,// default input device 
             0,              // no input 
-            paFloat32,  // 32 bit floating point input 
-            NULL,
-            Pa_GetDefaultOutputDeviceID(),
             2,          // stereo output 
             paFloat32,      // 32 bit floating point output 
-            NULL,
             mSampleRate,
             1024,   // frames per buffer
-            0,    // number of buffers, if zero then use default minimum 
-            paClipOff, // we won't output out of range samples so
-                       // don't bother clipping them 
             portaudioCallback,
             (void *)this );  // pass self-pointer to callback function