Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
af66f666
Commit
af66f666
authored
Mar 01, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiofile: added 24 bit support
Don't hard code the "bits" parameter to 16. Try to use the input's sample format, if possible.
parent
614fe8b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
NEWS
NEWS
+1
-0
audiofile_plugin.c
src/decoder/audiofile_plugin.c
+8
-1
No files found.
NEWS
View file @
af66f666
...
...
@@ -9,6 +9,7 @@ ver 0.15 - (200?/??/??)
- parse RVA2 tags in mp3 files
* decoders:
- audiofile: streaming support added
- audiofile: added 24 bit support
- modplug: another MOD plugin, based on libmodplug
- mikmod disabled by default, due to severe security issues in libmikmod
- sidplay: new decoder plugin for C64 SID (using libsidplay2)
...
...
src/decoder/audiofile_plugin.c
View file @
af66f666
...
...
@@ -127,8 +127,15 @@ audiofile_stream_decode(struct decoder *decoder, struct input_stream *is)
return
;
}
afGetSampleFormat
(
af_fp
,
AF_DEFAULT_TRACK
,
&
fs
,
&
bits
);
if
(
!
audio_valid_sample_format
(
bits
))
{
g_debug
(
"input file has %d bit samples, converting to 16"
,
bits
);
bits
=
16
;
}
afSetVirtualSampleFormat
(
af_fp
,
AF_DEFAULT_TRACK
,
AF_SAMPFMT_TWOSCOMP
,
16
);
AF_SAMPFMT_TWOSCOMP
,
bits
);
afGetVirtualSampleFormat
(
af_fp
,
AF_DEFAULT_TRACK
,
&
fs
,
&
bits
);
audio_format
.
bits
=
(
uint8_t
)
bits
;
audio_format
.
sample_rate
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment