History

avformat/alp: fix handling of TUN files

Sample rate is always 22050. Verified by trying various files in the game.

Zane van Iperen committed 6 years ago

Commit 5df7fd11 parent d6e903b1 file · +1 −1Browse files

Unified · Split

libavformat/alp.c+1−1
@@ -83,7 +83,7 @@ static int alp_read_header(AVFormatContext *s) · 82 unmodified lines
83 83
84 if (hdr.header_size == 8) {84 if (hdr.header_size == 8) {
85 /* .TUN music file */85 /* .TUN music file */
86 hdr.sample_rate = 11025 * hdr.num_channels;86 hdr.sample_rate = 22050;
87 } else {87 } else {
88 /* .PCM sound file */88 /* .PCM sound file */
89 hdr.sample_rate = avio_rl32(s->pb);89 hdr.sample_rate = avio_rl32(s->pb);

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