toolbox

Check-in [7d897a0e08]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:soudnmachine: switch to mpv
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: 7d897a0e08214a004a870d6e2750f948cb85984cf92f4df3260a2dfebd3cbcef
User & Date: jef 2020-06-15 19:14:13
Context
2020-06-15
19:14
soudnmachine: switch to mpv Leaf check-in: 7d897a0e08 user: jef tags: trunk
2020-06-10
04:19
rss: remove useless variable check-in: 8648f0c046 user: jef tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/soundmachine.txt.

12
13
14
15
16
17
18
19
20
21
22
23
24
OPTIONS
     -l      List available sounds.

EXAMPLE
     $ soundmachine fart

DEPENDENCIES
     soundmachine depends on mpg123(1).

AUTHOR
     Gerome Fournier <jef@foutaise.org>.

                                 January 2019







|





12
13
14
15
16
17
18
19
20
21
22
23
24
OPTIONS
     -l      List available sounds.

EXAMPLE
     $ soundmachine fart

DEPENDENCIES
     soundmachine depends on mpv(1).

AUTHOR
     Gerome Fournier <jef@foutaise.org>.

                                 January 2019

Changes to src/soundmachine/soundmachine.1.

18
19
20
21
22
23
24
25
26
27
.Sh EXAMPLE
.Bd -literal
$ soundmachine fart
.Ed
.Sh DEPENDENCIES
.Nm
depends on
.Xr mpg123 1 .
.Sh AUTHOR
.An Gerome Fournier Aq Mt jef@foutaise.org .







|


18
19
20
21
22
23
24
25
26
27
.Sh EXAMPLE
.Bd -literal
$ soundmachine fart
.Ed
.Sh DEPENDENCIES
.Nm
depends on
.Xr mpv 1 .
.Sh AUTHOR
.An Gerome Fournier Aq Mt jef@foutaise.org .

Changes to src/soundmachine/soundmachine.c.

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
		die("unable to fork process");
		break;
	case 0:
		close(fds[1]);
		dup2(fds[0], 0);
		close(1);
		close(2);
		execlp("mpg123", "mpg123", "-", NULL);
		die("unable to open mpg123 player");
		break;
	}

	close(fds[0]);
	if (write(fds[1], s->data, *s->size) != *s->size)
		die("write error to mpg123 player");
	close(fds[1]);
	waitpid(pid, &status, 0);
}

int
main(int argc, char *argv[])
{







|
|





|







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
		die("unable to fork process");
		break;
	case 0:
		close(fds[1]);
		dup2(fds[0], 0);
		close(1);
		close(2);
		execlp("mpv", "mpv", "--really-quiet", "-", NULL);
		die("unable to open mpv player");
		break;
	}

	close(fds[0]);
	if (write(fds[1], s->data, *s->size) != *s->size)
		die("write error to mpv player");
	close(fds[1]);
	waitpid(pid, &status, 0);
}

int
main(int argc, char *argv[])
{