packages feed

proteaaudio 0.9.3 → 0.9.4

raw patch · 3 files changed

+14/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+# 0.9.4+- fix PulseAudio default output device detection+ # 0.9.3 - apply migration to GHC 9.4.* for Windows (see https://gitlab.haskell.org/ghc/ghc/-/issues/22738) 
cbits/RtAudio.cpp view
@@ -406,12 +406,22 @@ unsigned int RtApi :: getDefaultInputDevice( void )
 {
   // Should be implemented in subclasses if possible.
+  for ( unsigned int i = 0; i < getDeviceCount(); i++ ) {
+    if ( getDeviceInfo( i ).isDefaultInput ) {
+      return i;
+    }
+  }
   return 0;
 }
 
 unsigned int RtApi :: getDefaultOutputDevice( void )
 {
   // Should be implemented in subclasses if possible.
+  for ( unsigned int i = 0; i < getDeviceCount(); i++ ) {
+    if ( getDeviceInfo( i ).isDefaultOutput ) {
+      return i;
+    }
+  }
   return 0;
 }
 
proteaaudio.cabal view
@@ -1,6 +1,6 @@ Cabal-Version:       2.2 Name:                proteaaudio-Version:             0.9.3+Version:             0.9.4 Synopsis:            Simple audio library for Windows, Linux, OSX. Description:         Simple audio library for Windows, Linux, OSX. Supports PCM, Ogg and Wav playback and multichannel mixing. License:             BSD-3-Clause