mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 00:28:20 +00:00
[client] audiodevs/pipewire: implement proper recording stop/restart
Before, pipewire_recordStop did nothing since pw.record.active was always false.
This commit is contained in:
parent
75370e464d
commit
fb5a71c47e
@ -426,7 +426,16 @@ static void pipewire_recordStart(int channels, int sampleRate,
|
||||
if (pw.record.stream &&
|
||||
pw.record.channels == channels &&
|
||||
pw.record.sampleRate == sampleRate)
|
||||
{
|
||||
if (!pw.record.active)
|
||||
{
|
||||
pw_thread_loop_lock(pw.thread);
|
||||
pw_stream_set_active(pw.record.stream, true);
|
||||
pw.record.active = true;
|
||||
pw_thread_loop_unlock(pw.thread);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
pipewire_recordStopStream();
|
||||
|
||||
@ -474,6 +483,7 @@ static void pipewire_recordStart(int channels, int sampleRate,
|
||||
params, 1);
|
||||
|
||||
pw_thread_loop_unlock(pw.thread);
|
||||
pw.record.active = true;
|
||||
}
|
||||
|
||||
static void pipewire_recordStop(void)
|
||||
|
Loading…
Reference in New Issue
Block a user