mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +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 &&
|
if (pw.record.stream &&
|
||||||
pw.record.channels == channels &&
|
pw.record.channels == channels &&
|
||||||
pw.record.sampleRate == sampleRate)
|
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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pipewire_recordStopStream();
|
pipewire_recordStopStream();
|
||||||
|
|
||||||
@ -474,6 +483,7 @@ static void pipewire_recordStart(int channels, int sampleRate,
|
|||||||
params, 1);
|
params, 1);
|
||||||
|
|
||||||
pw_thread_loop_unlock(pw.thread);
|
pw_thread_loop_unlock(pw.thread);
|
||||||
|
pw.record.active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pipewire_recordStop(void)
|
static void pipewire_recordStop(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user