1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
$NetBSD: patch-ad,v 1.2 2011/03/20 19:13:16 shattered Exp $
--- ogg123/ogg123.c.orig 2002-07-06 19:12:18.000000000 +0000
+++ ogg123/ogg123.c
@@ -453,6 +453,16 @@ void play (char *source_string)
return;
}
+ if ((new_audio_fmt.big_endian != (BYTE_ORDER == BIG_ENDIAN)) ||
+ new_audio_fmt.signed_sample != 1 ||
+ new_audio_fmt.word_size != 2)
+ {
+ /* Tremor can only do big_endian, signed, 16 bit samples */
+ status_error(_("Error, Tremor can only decode signed 16 bit PCM "
+ "host endian.\n"));
+ return;
+ }
+
/* Decide which statistics are valid */
select_stats(stat_format, &options, source, decoder, audio_buffer);
@@ -580,7 +590,13 @@ void play (char *source_string)
format->cleanup(decoder);
transport->close(source);
+#if 0
+ /*
+ * XXX: should be done properly with pthread_cleanup_push instead,
+ * if at all.
+ */
status_reset_output_lock(); /* In case we were killed mid-output */
+#endif
status_message(1, _("Done."));
|