Your message dated Mon, 03 Mar 2025 11:51:54 +0000
with message-id <[email protected]>
and subject line Bug#1098900: fixed in libsdl3 3.2.6+ds-1
has caused the Debian Bug report #1098900,
regarding libsdl3-dev: audio capture with pulseaudio does not work
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1098900: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098900
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libsdl2-dev
Version: 2.32.0+dfsg-1
Forwarded: https://github.com/libsdl-org/SDL/issues/9706

As in <URL: https://github.com/libsdl-org/SDL/issues/9706 >, I
discovered this problem when trying to use whisper.cpp, and thanks to
the example program provided there, I can confirm that the issue is with
SDL 2.

This is the test program:

#include <SDL2/SDL.h>
#include <iostream>

const int SAMPLE_RATE = 16000;
const int NUM_CHANNELS = 1;
const int BUFFER_SIZE = 1024;
const int RECORDING_TIME = 2000; // 2 seconds in milliseconds

int callbackCount = 0;

// Audio callback function
void audioCallback(void* userdata, Uint8* stream, int len) {
    // Do nothing with the audio data, just count the callback invocations
    callbackCount++;
}

int main() {
    if (SDL_Init(SDL_INIT_AUDIO) < 0) {
        std::cerr << "SDL initialization failed: " << SDL_GetError() << 
std::endl;
        return 1;
    }

    SDL_AudioSpec wantedSpec;
    SDL_zero(wantedSpec);
    wantedSpec.freq = SAMPLE_RATE;
    wantedSpec.format = AUDIO_F32;
    wantedSpec.channels = NUM_CHANNELS;
    wantedSpec.samples = BUFFER_SIZE;
    wantedSpec.callback = audioCallback;

    SDL_AudioSpec obtainedSpec;
    SDL_zero(obtainedSpec);

    // Open the default audio capture device
    SDL_AudioDeviceID audioDevice = SDL_OpenAudioDevice(NULL, 1, &wantedSpec, 
&obtainedSpec, 0);
    if (audioDevice == 0) {
        std::cerr << "Failed to open audio: " << SDL_GetError() << std::endl;
        SDL_Quit();
        return 1;
    }

    // Start recording
    SDL_PauseAudioDevice(audioDevice, 0);

    // Wait for recording time
    SDL_Delay(RECORDING_TIME);

    // Stop recording
    SDL_PauseAudioDevice(audioDevice, 1);

    // Close the audio device
    SDL_CloseAudioDevice(audioDevice);

    // Print out the number of callback invocations
    std::cout << "Callback invoked " << callbackCount << " times." << std::endl;

    SDL_Quit();
    return !callbackCount;
}

Tested using "g++ -o test test.cpp -lSDL2", and producing the
following output with pulseaudio:

  %./test
  Callback invoked 0 times.
  %

Here are some alternative results:

  % SDL_AUDIODRIVER=alsa ./test
  Callback invoked 35 times.
  % SDL_AUDIODRIVER=pipewire ./test
  [W][26087.476267] pw.conf      | [          conf.c: 1214 try_load_conf()] 
can't load config client.conf: No such file or directory
  [E][26087.476293] pw.conf      | [          conf.c: 1243 
pw_conf_load_conf_for_context()] can't load config client.conf: No such file or 
directory
  SDL initialization failed: Pipewire: Failed to create hotplug detection 
context (2)
  %

-- 
Happy hacking
Petter Reinholdtsen

--- End Message ---
--- Begin Message ---
Source: libsdl3
Source-Version: 3.2.6+ds-1
Done: Simon McVittie <[email protected]>

We believe that the bug you reported is fixed in the latest version of
libsdl3, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Simon McVittie <[email protected]> (supplier of updated libsdl3 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 03 Mar 2025 09:45:37 +0000
Source: libsdl3
Architecture: source
Version: 3.2.6+ds-1
Distribution: unstable
Urgency: medium
Maintainer: Debian SDL packages maintainers 
<[email protected]>
Changed-By: Simon McVittie <[email protected]>
Closes: 1098900
Changes:
 libsdl3 (3.2.6+ds-1) unstable; urgency=medium
 .
   * New upstream stable release
   * d/patches: Update to upstream 3.2.x branch commit
     release-3.2.6-5-g18d93d11e1, excluding macOS-specific changes
 .
 libsdl3 (3.2.4+git20250228+ds-1) experimental; urgency=medium
 .
   * New upstream snapshot
     - Among many other changes, this fixes an audio capture regression
       with PulseAudio in versions since 2.30 (Closes: #1098900)
   * d/copyright: Update
 .
 libsdl3 (3.2.4+git20250218+ds-1) experimental; urgency=medium
 .
   * d/watch.git: Update
   * d/gbp.conf, d/watch: Watch for git snapshots
   * New upstream snapshot
   * d/copyright: Update
   * d/rules: Be more explicit about what we do and don't load dynamically
   * d/rules: Treat testtimer as flaky when running on non-x86, non-aarch64.
     There is an assertion that requesting a 1ms delay does not result in
     a delay of more than 100ms, and that isn't reliably true on slow
     machines like riscv64 or batch-processing-oriented machines like s390x,
     resulting in test failures.
     This makes those machines unsuitable for playing fast-paced SDL-based
     games, but we already knew that.
Checksums-Sha1:
 51fc0bf61372aabcd3f4e4ebeeaa4fb39cbf9e3f 3181 libsdl3_3.2.6+ds-1.dsc
 5207b8aee16f049eea850635831dcdecdac04f52 11722384 libsdl3_3.2.6+ds.orig.tar.xz
 9740d1dbd61e6efcb3f06007abf07f6c51f5729c 42500 libsdl3_3.2.6+ds-1.debian.tar.xz
 cdeb13ccb1f6a62703bd2bda99879eee49c6365b 11683 
libsdl3_3.2.6+ds-1_source.buildinfo
Checksums-Sha256:
 1c80cd63856fb7e442050795c60bc863f333eb287f830eecbaa2c9a90f3c97c1 3181 
libsdl3_3.2.6+ds-1.dsc
 cc94eacd706ba8f06638a7b16d15a0ec75095de7fc3da316fdcdd9004b8d726d 11722384 
libsdl3_3.2.6+ds.orig.tar.xz
 ef1ce1dcffc22a43ef466faa09b984e825f126af616359447366228a13568361 42500 
libsdl3_3.2.6+ds-1.debian.tar.xz
 4eb330498492be506cc53489191addb8955416f7fcd90b0a24fcda333157d019 11683 
libsdl3_3.2.6+ds-1_source.buildinfo
Files:
 3a13c694852f4b9198cdb66c27cc8993 3181 libs optional libsdl3_3.2.6+ds-1.dsc
 781733baf4de06f4fa4fd73f3804c76a 11722384 libs optional 
libsdl3_3.2.6+ds.orig.tar.xz
 a1380a8c261ca58246d10ddf183831e7 42500 libs optional 
libsdl3_3.2.6+ds-1.debian.tar.xz
 d5326832a903187ec51ed4534786d311 11683 libs optional 
libsdl3_3.2.6+ds-1_source.buildinfo


-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEegc60a5pT6Jb/2LlI1wJnT6zMHYFAmfFk/wACgkQI1wJnT6z
MHb8RA//YVTGMjOtQxZCkGwDY2Nr4lc0WM21ttF6X8z8g6PYdHaLlSFu1lR/DyyL
QburV9vj6drni1+1I47z74qlSWEG3t6F0ARchwHm6oBwPOtuDhm4iWngrqhOzIFL
Aez2R+TipuBPGiHgRCUj8CA7MHw4/SSAeISHC/13PORtfMffnNML3iK5rW49iYNR
NKHCE+xl0KHrDN8xtPUr22/Eisroj1uo4QXxpjqd9A/xeP0dWOuHjoMD13Ef1ghk
1GQQgVysRIeEdJzDs+uUc7ZdmyaIIIFhettArkoUCsCv+VSqmgg30UFYekUaF41d
njfTdXOkrFLUUk9rHI25enuCvZaanh5b4ycwTxWEqxcMb5ucQqOY5OvPkdb/GaAC
dbUA4p7jZHyiQtBMPEA9Qfg4ekViVmiaOrY3Pda5D90lrDxLiKtPnUr9qjK+6dox
N/zuRbELCoFJxkH6Qk3eJLdmyS3Hbwh2Gi/czjPupGL3SC2hgUIvJxoAB6aCcOOL
BTNJR2ohov5u/kEKrI3HDhNYrQTV12DaE2oBcKK6P0fjgwTxJEag0qkdGFBF0uHm
+kRykQme9P1SV3fm1iuCp1t2UsoLhOJOaTiF5szjON2tdQAwmT8WwsDTkEqAdiOW
q44Gu3VwNrJ3I3nLsk7KIfwrlT1ir5/hX7MdTlgfqo5DryAqmyc=
=rLLd
-----END PGP SIGNATURE-----

Attachment: pgpr0mveaCvPV.pgp
Description: PGP signature


--- End Message ---

Reply via email to