History

ao_avfoundation: support set_pause

Misaki Kasumi committed 2 years ago

Commit dbc1e3a1 parent 93a924a1 file · +14 −0Browse files

Unified · Split

audio/out/ao_avfoundation.m+14−0
@@ -159,6 +159,19 @@ static void stop(struct ao *ao) · 158 unmodified lines
159 });159 });
160}160}
161 161
162static bool set_pause(struct ao *ao, bool paused)
163{
164 struct priv *p = ao->priv;
165
166 if (paused) {
167 [p->synchronizer setRate:0];
168 } else {
169 [p->synchronizer setRate:1];
170 }
171
172 return true;
173}
174
162static int control(struct ao *ao, enum aocontrol cmd, void *arg)175static int control(struct ao *ao, enum aocontrol cmd, void *arg)
163{176{
164 struct priv *p = ao->priv;177 struct priv *p = ao->priv;
@@ -353,6 +366,7 @@ const struct ao_driver audio_out_avfoundation = { · 188 unmodified lines
353 .control = control,366 .control = control,
354 .reset = stop,367 .reset = stop,
355 .start = start,368 .start = start,
369 .set_pause = set_pause,
356 .list_devs = ca_get_device_list,370 .list_devs = ca_get_device_list,
357 .priv_size = sizeof(struct priv),371 .priv_size = sizeof(struct priv),
358};372};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t