Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package FAudio for openSUSE:Factory checked 
in at 2022-10-25 11:19:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/FAudio (Old)
 and      /work/SRC/openSUSE:Factory/.FAudio.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "FAudio"

Tue Oct 25 11:19:54 2022 rev:23 rq:1030912 version:22.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/FAudio/FAudio.changes    2022-08-10 
17:15:31.810057253 +0200
+++ /work/SRC/openSUSE:Factory/.FAudio.new.2275/FAudio.changes  2022-10-25 
11:19:57.710130587 +0200
@@ -1,0 +2,25 @@
+Mon Oct 24 14:33:50 UTC 2022 - Aaron Stern <[email protected]>
+
+- Update to 22.10:
+  * Added a quick comment to the SDL backend.
+
+-------------------------------------------------------------------
+Mon Oct 24 14:31:41 UTC 2022 - Aaron Stern <[email protected]>
+
+- Update to 22.09.01:
+  * Fix a regression where requesting a specific mastering voice format 
+    would return a format overwritten by device defaults
+
+-------------------------------------------------------------------
+Mon Oct 24 14:28:37 UTC 2022 - Aaron Stern <[email protected]>
+
+- Update to 22.09:
+  * Update to SDL 2.24. This has been made a hard requirement, as it 
+    fixes/adds way too much to ignore:
+    2.1 and 4.1 audio is now supported
+  * On Windows, we now prioritize DirectSound over WASAPI
+  * The PulseAudio samples hack has been removed
+  * The non-power-of-two samples hack for Emscripten/OSS has also been removed
+  * GetDeviceDetails(0) now uses SDL_GetDefaultAudioInfo, obsoleting our hack
+
+-------------------------------------------------------------------

Old:
----
  FAudio-22.08.tar.gz

New:
----
  FAudio-22.10.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ FAudio.spec ++++++
--- /var/tmp/diff_new_pack.VkUTUk/_old  2022-10-25 11:19:58.298131890 +0200
+++ /var/tmp/diff_new_pack.VkUTUk/_new  2022-10-25 11:19:58.302131899 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           FAudio
-Version:        22.08
+Version:        22.10
 Release:        0
 Summary:        A reimplementation of the XNA Game Studio libraries
 License:        Zlib

++++++ FAudio-22.08.tar.gz -> FAudio-22.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FAudio-22.08/CMakeLists.txt 
new/FAudio-22.10/CMakeLists.txt
--- old/FAudio-22.08/CMakeLists.txt     2022-08-01 17:35:26.000000000 +0200
+++ new/FAudio-22.10/CMakeLists.txt     2022-10-01 17:06:25.000000000 +0200
@@ -29,7 +29,7 @@
 # Version
 SET(LIB_MAJOR_VERSION "0")
 SET(LIB_MINOR_VERSION "22")
-SET(LIB_REVISION "08")
+SET(LIB_REVISION "10")
 SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}")
 
 # Build Type
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FAudio-22.08/README new/FAudio-22.10/README
--- old/FAudio-22.08/README     2022-08-01 17:35:26.000000000 +0200
+++ new/FAudio-22.10/README     2022-10-01 17:06:25.000000000 +0200
@@ -15,7 +15,7 @@
 
 Dependencies
 ------------
-FAudio depends solely on SDL 2.0.9 or newer.
+FAudio depends solely on SDL 2.24.0 or newer.
 FAudio never explicitly uses the C runtime.
 
 Building FAudio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FAudio-22.08/csharp/FAudio.cs 
new/FAudio-22.10/csharp/FAudio.cs
--- old/FAudio-22.08/csharp/FAudio.cs   2022-08-01 17:35:26.000000000 +0200
+++ new/FAudio-22.10/csharp/FAudio.cs   2022-10-01 17:06:25.000000000 +0200
@@ -79,7 +79,7 @@
 
        public const uint FAUDIO_ABI_VERSION =           0;
        public const uint FAUDIO_MAJOR_VERSION =        22;
-       public const uint FAUDIO_MINOR_VERSION =         8;
+       public const uint FAUDIO_MINOR_VERSION =        10;
        public const uint FAUDIO_PATCH_VERSION =         0;
 
        public const uint FAUDIO_COMPILED_VERSION = (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FAudio-22.08/include/FAudio.h 
new/FAudio-22.10/include/FAudio.h
--- old/FAudio-22.08/include/FAudio.h   2022-08-01 17:35:26.000000000 +0200
+++ new/FAudio-22.10/include/FAudio.h   2022-10-01 17:06:25.000000000 +0200
@@ -485,7 +485,7 @@
 
 #define FAUDIO_ABI_VERSION      0
 #define FAUDIO_MAJOR_VERSION   22
-#define FAUDIO_MINOR_VERSION    8
+#define FAUDIO_MINOR_VERSION   10
 #define FAUDIO_PATCH_VERSION    0
 
 #define FAUDIO_COMPILED_VERSION ( \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FAudio-22.08/src/FACT.c new/FAudio-22.10/src/FACT.c
--- old/FAudio-22.08/src/FACT.c 2022-08-01 17:35:26.000000000 +0200
+++ new/FAudio-22.10/src/FACT.c 2022-10-01 17:06:25.000000000 +0200
@@ -2409,7 +2409,6 @@
 {
        FACTCue *cue, *prev;
        FAudioMutex mutex;
-       FACTNotification note;
        if (pCue == NULL)
        {
                return 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FAudio-22.08/src/FAudio.c 
new/FAudio-22.10/src/FAudio.c
--- old/FAudio-22.08/src/FAudio.c       2022-08-01 17:35:26.000000000 +0200
+++ new/FAudio-22.10/src/FAudio.c       2022-10-01 17:06:25.000000000 +0200
@@ -678,16 +678,27 @@
        uint32_t DeviceIndex,
        const FAudioEffectChain *pEffectChain
 ) {
-       FAudioDeviceDetails details;
-
        LOG_API_ENTER(audio)
 
        /* For now we only support one allocated master voice at a time */
        FAudio_assert(audio->master == NULL);
 
-       if (FAudio_GetDeviceDetails(audio, DeviceIndex, &details) != 0)
+       if (    InputChannels == FAUDIO_DEFAULT_CHANNELS ||
+               InputSampleRate == FAUDIO_DEFAULT_SAMPLERATE    )
        {
-               return FAUDIO_E_INVALID_CALL;
+               FAudioDeviceDetails details;
+               if (FAudio_GetDeviceDetails(audio, DeviceIndex, &details) != 0)
+               {
+                       return FAUDIO_E_INVALID_CALL;
+               }
+               if (InputChannels == FAUDIO_DEFAULT_CHANNELS)
+               {
+                       InputChannels = details.OutputFormat.Format.nChannels;
+               }
+               if (InputSampleRate == FAUDIO_DEFAULT_SAMPLERATE)
+               {
+                       InputSampleRate = 
details.OutputFormat.Format.nSamplesPerSec;
+               }
        }
 
        *ppMasteringVoice = (FAudioMasteringVoice*) 
audio->pMalloc(sizeof(FAudioVoice));
@@ -704,12 +715,8 @@
        (*ppMasteringVoice)->volume = 1.0f;
 
        /* Master Properties */
-       (*ppMasteringVoice)->master.inputChannels = (InputChannels == 
FAUDIO_DEFAULT_CHANNELS) ?
-               details.OutputFormat.Format.nChannels :
-               InputChannels;
-       (*ppMasteringVoice)->master.inputSampleRate = (InputSampleRate == 
FAUDIO_DEFAULT_SAMPLERATE) ?
-               details.OutputFormat.Format.nSamplesPerSec :
-               InputSampleRate;
+       (*ppMasteringVoice)->master.inputChannels = InputChannels;
+       (*ppMasteringVoice)->master.inputSampleRate = InputSampleRate;
 
        /* Sends/Effects */
        FAudio_zero(&(*ppMasteringVoice)->sends, sizeof(FAudioVoiceSends));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FAudio-22.08/src/FAudioFX_reverb.c 
new/FAudio-22.10/src/FAudioFX_reverb.c
--- old/FAudio-22.08/src/FAudioFX_reverb.c      2022-08-01 17:35:26.000000000 
+0200
+++ new/FAudio-22.10/src/FAudioFX_reverb.c      2022-10-01 17:06:25.000000000 
+0200
@@ -130,11 +130,13 @@
        return delay_out;
 }
 
+/* FIXME: This is currently unused! What was it for...? -flibit
 static inline float DspDelay_Tap(DspDelay *filter, uint32_t delay)
 {
        FAudio_assert(delay <= filter->delay);
        return filter->buffer[(filter->write_idx - delay + filter->capacity) % 
filter->capacity];
 }
+*/
 
 static inline void DspDelay_Reset(DspDelay *filter)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/FAudio-22.08/src/FAudio_platform_sdl2.c 
new/FAudio-22.10/src/FAudio_platform_sdl2.c
--- old/FAudio-22.08/src/FAudio_platform_sdl2.c 2022-08-01 17:35:26.000000000 
+0200
+++ new/FAudio-22.10/src/FAudio_platform_sdl2.c 2022-10-01 17:06:25.000000000 
+0200
@@ -30,8 +30,8 @@
 
 #include <SDL.h>
 
-#if !SDL_VERSION_ATLEAST(2, 0, 9)
-#error "SDL version older than 2.0.9"
+#if !SDL_VERSION_ATLEAST(2, 24, 0)
+#error "SDL version older than 2.24.0"
 #endif /* !SDL_VERSION_ATLEAST */
 
 /* Mixer Thread */
@@ -52,8 +52,47 @@
 
 /* Platform Functions */
 
+static void FAudio_INTERNAL_PrioritizeDirectSound()
+{
+       int numdrivers, i, wasapi, directsound;
+
+       if (SDL_GetHint("SDL_AUDIODRIVER") != NULL)
+       {
+               /* Already forced to something, ignore */
+               return;
+       }
+
+       /* Check to see if we have both Windows drivers in the list */
+       numdrivers = SDL_GetNumAudioDrivers();
+       wasapi = -1;
+       directsound = -1;
+       for (i = 0; i < numdrivers; i += 1)
+       {
+               const char *driver = SDL_GetAudioDriver(i);
+               if (SDL_strcmp(driver, "wasapi") == 0)
+               {
+                       wasapi = i;
+               }
+               else if (SDL_strcmp(driver, "directsound") == 0)
+               {
+                       directsound = i;
+               }
+       }
+
+       /* We force if and only if both drivers exist and wasapi is earlier */
+       if ((wasapi > -1) && (directsound > -1))
+       {
+               if (wasapi < directsound)
+               {
+                       SDL_SetHint("SDL_AUDIODRIVER", "directsound");
+               }
+       }
+}
+
 void FAudio_PlatformAddRef()
 {
+       FAudio_INTERNAL_PrioritizeDirectSound();
+
        /* SDL tracks ref counts for each subsystem */
        if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
        {
@@ -81,9 +120,6 @@
 ) {
        SDL_AudioDeviceID device;
        SDL_AudioSpec want, have;
-       const char *driver;
-       SDL_version version;
-       int changes = 0;
 
        FAudio_assert(mixFormat != NULL);
        FAudio_assert(updateSize != NULL);
@@ -109,49 +145,6 @@
                want.samples = want.freq / 100;
        }
 
-       /* FIXME: SDL bug!
-        * The PulseAudio backend does this annoying thing where it halves the
-        * buffer size to prevent latency issues:
-        *
-        * 
https://hg.libsdl.org/SDL/file/df343364c6c5/src/audio/pulseaudio/SDL_pulseaudio.c#l577
-        *
-        * To get the _actual_ quantum size we want, we just double the buffer
-        * size and allow SDL to set the quantum size back to normal.
-        * -flibit
-        */
-       driver = SDL_GetCurrentAudioDriver();
-       SDL_GetVersion(&version);
-       if (version.minor < 23 && SDL_strcmp(driver, "pulseaudio") == 0)
-       {
-               want.samples *= 2;
-               changes = SDL_AUDIO_ALLOW_SAMPLES_CHANGE;
-       }
-
-       /* FIXME: SDL bug!
-        * The most common backends support varying samples values, but many
-        * require a power-of-two value, which XAudio2 is not a fan of.
-        * Normally SDL creates an intermediary stream to handle this, but this
-        * has not been written yet:
-        * https://bugzilla.libsdl.org/show_bug.cgi?id=5136
-        * -flibit
-        */
-       else if (       SDL_strcmp(driver, "emscripten") == 0 ||
-                       SDL_strcmp(driver, "dsp") == 0  )
-       {
-               want.samples -= 1;
-               want.samples |= want.samples >> 1;
-               want.samples |= want.samples >> 2;
-               want.samples |= want.samples >> 4;
-               want.samples |= want.samples >> 8;
-               want.samples |= want.samples >> 16;
-               want.samples += 1;
-               SDL_Log(
-                       "Forcing FAudio quantum to a power-of-two.\n"
-                       "You don't actually want this, it's technically a 
bug:\n"
-                       "https://bugzilla.libsdl.org/show_bug.cgi?id=5136";
-               );
-       }
-
        /* Open the device (or at least try to) */
 iosretry:
        device = SDL_OpenAudioDevice(
@@ -159,7 +152,7 @@
                0,
                &want,
                &have,
-               changes
+               0
        );
        if (device == 0)
        {
@@ -226,7 +219,7 @@
        const char *name, *envvar;
        int channels, rate;
        SDL_AudioSpec spec;
-       uint32_t devcount, i;
+       uint32_t devcount;
 
        FAudio_zero(details, sizeof(FAudioDeviceDetails));
 
@@ -286,86 +279,27 @@
                channels = 0;
        }
 
-#if SDL_VERSION_ATLEAST(2, 0, 15)
+       /* Get the device format from the OS */
        if (index == 0)
        {
-               /* Okay, so go grab something from the liquor cabinet and get
-                * ready, because this loop is a bit of a trip:
-                *
-                * We can't get the spec for the default device, because in
-                * audio land a "default device" is a completely foreign idea,
-                * some APIs support it but in reality you just have to pass
-                * NULL as a driver string and the sound server figures out the
-                * rest. In some psychotic universe the device can even be a
-                * network address. No, seriously.
-                *
-                * So what do we do? Well, at least in my experience shipping
-                * for the PC, the easiest thing to do is assume that the
-                * highest spec in the list is what you should target, even if
-                * it turns out that's not the default at the time you create
-                * your device.
-                *
-                * Consider a laptop that has built-in stereo speakers, but is
-                * connected to a home theater system with 5.1 audio. It may be
-                * the case that the stereo audio is active, but the user may
-                * at some point move audio to 5.1, at which point the server
-                * will simply move the endpoint from underneath us and move our
-                * output stream to the new device. At that point, you _really_
-                * want to already be pushing out 5.1, because if not the user
-                * will be stuck recreating the whole program, which on many
-                * platforms is an instant cert failure. The tradeoff is that
-                * you're potentially downmixing a 5.1 stream to stereo, which
-                * is a bit wasteful, but presumably the hardware can handle it
-                * if they were able to use a 5.1 system to begin with.
-                *
-                * So, we just aim for the highest channel count on the system.
-                * We also do this with sample rate to a lesser degree; we try
-                * to use a single device spec at a time, so it may be that
-                * the sample rate you get isn't the highest from the list if
-                * another device had a higher channel count.
-                *
-                * Lastly, if you set SDL_AUDIO_CHANNELS but not
-                * SDL_AUDIO_FREQUENCY, we don't bother checking for a sample
-                * rate, we fall through to the hardcoded value at the bottom of
-                * this function.
-                *
-                * I'm so tired.
-                *
-                * -flibit
-                */
-               if (channels <= 0)
+               /* TODO: Do we want to squeeze the name into the output? */
+               if (SDL_GetDefaultAudioInfo(NULL, &spec, 0) < 0)
                {
-                       const uint8_t setRate = (rate <= 0);
-                       devcount -= 1; /* Subtracting the default index */
-                       for (i = 0; i < devcount; i += 1)
-                       {
-                               SDL_GetAudioDeviceSpec(i, 0, &spec);
-                               if (    (spec.channels > channels) &&
-                                       (spec.channels <= 8)    )
-                               {
-                                       channels = spec.channels;
-                                       if (setRate)
-                                       {
-                                               /* May be 0! That's okay! */
-                                               rate = spec.freq;
-                                       }
-                               }
-                       }
+                       SDL_zero(spec);
                }
        }
        else
        {
                SDL_GetAudioDeviceSpec(index - 1, 0, &spec);
-               if ((spec.freq > 0) && (rate <= 0))
-               {
-                       rate = spec.freq;
-               }
-               if ((spec.channels > 0) && (channels <= 0))
-               {
-                       channels = spec.channels;
-               }
        }
-#endif /* SDL >= 2.0.15 */
+       if ((spec.freq > 0) && (rate <= 0))
+       {
+               rate = spec.freq;
+       }
+       if ((spec.channels > 0) && (channels <= 0))
+       {
+               channels = spec.channels;
+       }
 
        /* If we make it all the way here with no format, hardcode a sane one */
        if (rate <= 0)
@@ -377,26 +311,6 @@
                channels = 2;
        }
 
-       /* FIXME: SDL bug!
-        * SDL_audio.c enforces specific channel counts for all platforms,
-        * even if they support channel counts that could make sense (for
-        * example, 2.1 is not supported), so we have to adjust it here.
-        *
-        * Note that we don't check > 8 since we do that in the spec check,
-        * meaning only the environment variable can give us this and that
-        * needs to break for validation purposes.
-        *
-        * -flibit
-        */
-       if (channels == 3)
-       {
-               channels = 2;
-       }
-       if (channels == 5)
-       {
-               channels = 4;
-       }
-
        /* Write the format, finally. */
        WriteWaveFormatExtensible(
                &details->OutputFormat,

Reply via email to