mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Completed renaming drain->stop, flush->drain (PCM). Done renaming drain->drop, flush->drain (rawmidi and seq). Removed wrong module usage count inc/dec from mmap
This commit is contained in:
parent
7088f19233
commit
2ea3fd4bb3
22 changed files with 86 additions and 86 deletions
24
test/pcm.c
24
test/pcm.c
|
|
@ -86,11 +86,11 @@ void method2(void)
|
|||
return;
|
||||
}
|
||||
printf("done...\n");
|
||||
if ((err = snd_pcm_flush_capture(rhandle)) < 0) {
|
||||
printf("Record flush error: %s\n", snd_strerror(err));
|
||||
if ((err = snd_pcm_drain_capture(rhandle)) < 0) {
|
||||
printf("Record drain error: %s\n", snd_strerror(err));
|
||||
return;
|
||||
}
|
||||
printf("Record flush done...\n");
|
||||
printf("Record drain done...\n");
|
||||
printf("Playback... ");
|
||||
fflush(stdout);
|
||||
if ((err = snd_pcm_writei(phandle, buffer, sizeof(buffer))) != sizeof(buffer)) {
|
||||
|
|
@ -98,11 +98,11 @@ void method2(void)
|
|||
return;
|
||||
}
|
||||
printf("done...\n");
|
||||
if ((err = snd_pcm_flush_playback(phandle)) < 0) {
|
||||
printf("Playback flush error: %s\n", snd_strerror(err));
|
||||
if ((err = snd_pcm_drain_playback(phandle)) < 0) {
|
||||
printf("Playback drain error: %s\n", snd_strerror(err));
|
||||
return;
|
||||
}
|
||||
printf("Playback flush done...\n");
|
||||
printf("Playback drain done...\n");
|
||||
snd_pcm_close(phandle);
|
||||
printf("Playback close...\n");
|
||||
snd_pcm_close(rhandle);
|
||||
|
|
@ -127,11 +127,11 @@ void method3(void)
|
|||
return;
|
||||
}
|
||||
printf("done...\n");
|
||||
if ((err = snd_pcm_flush_capture(handle)) < 0) {
|
||||
printf("Record flush error: %s\n", snd_strerror(err));
|
||||
if ((err = snd_pcm_drain_capture(handle)) < 0) {
|
||||
printf("Record drain error: %s\n", snd_strerror(err));
|
||||
return;
|
||||
}
|
||||
printf("Record flush done...\n");
|
||||
printf("Record drain done...\n");
|
||||
printf("Playback... ");
|
||||
fflush(stdout);
|
||||
if ((err = snd_pcm_writei(handle, buffer, sizeof(buffer))) != sizeof(buffer)) {
|
||||
|
|
@ -139,11 +139,11 @@ void method3(void)
|
|||
return;
|
||||
}
|
||||
printf("done...\n");
|
||||
if ((err = snd_pcm_flush_playback(handle)) < 0) {
|
||||
printf("Playback flush error: %s\n", snd_strerror(err));
|
||||
if ((err = snd_pcm_drain_playback(handle)) < 0) {
|
||||
printf("Playback drain error: %s\n", snd_strerror(err));
|
||||
return;
|
||||
}
|
||||
printf("Playback flush done...\n");
|
||||
printf("Playback drain done...\n");
|
||||
snd_pcm_close(handle);
|
||||
printf("Close...\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue