Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Vorbis tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
61
Issues
61
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Vorbis tools
Commits
a5d8b7bc
Commit
a5d8b7bc
authored
Mar 29, 2003
by
Michael Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
24 bit input support.
svn path=/trunk/vorbis-tools/; revision=4566
parent
39c83969
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
7 deletions
+34
-7
oggenc/audio.c
oggenc/audio.c
+32
-5
oggenc/oggenc.c
oggenc/oggenc.c
+2
-2
No files found.
oggenc/audio.c
View file @
a5d8b7bc
...
...
@@ -321,7 +321,7 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
{
fprintf
(
stderr
,
_
(
"Warning: OggEnc does not support this type of AIFF/AIFC file
\n
"
" Must be 8
or 16
bit PCM.
\n
"
));
" Must be 8
, 16, or 24
bit PCM.
\n
"
));
return
0
;
}
}
...
...
@@ -420,7 +420,9 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen)
if
(
format
.
align
==
format
.
channels
*
samplesize
&&
format
.
samplesize
==
samplesize
*
8
)
format
.
samplesize
==
samplesize
*
8
&&
(
format
.
samplesize
==
24
||
format
.
samplesize
==
16
||
format
.
samplesize
==
8
))
{
/* OK, good - we have the one supported format,
now we want to find the size of the file */
...
...
@@ -461,7 +463,7 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen)
else
{
fprintf
(
stderr
,
_
(
"ERROR: Wav file is unsupported subformat (must be
16
bit PCM
\n
"
_
(
"ERROR: Wav file is unsupported subformat (must be
8,16, or 24
bit PCM
\n
"
"or floating point PCM
\n
"
));
return
0
;
}
...
...
@@ -495,7 +497,7 @@ long wav_read(void *in, float **buffer, int samples)
}
}
}
else
else
if
(
f
->
samplesize
==
16
)
{
if
(
!
f
->
bigendian
)
{
...
...
@@ -520,6 +522,32 @@ long wav_read(void *in, float **buffer, int samples)
}
}
}
else
if
(
f
->
samplesize
==
24
)
{
if
(
!
f
->
bigendian
)
{
for
(
i
=
0
;
i
<
realsamples
;
i
++
)
{
for
(
j
=
0
;
j
<
f
->
channels
;
j
++
)
{
buffer
[
j
][
i
]
=
((
buf
[
i
*
3
*
f
->
channels
+
3
*
j
+
2
]
<<
16
)
|
(((
unsigned
char
*
)
buf
)[
i
*
3
*
f
->
channels
+
3
*
j
+
1
]
<<
8
)
|
(((
unsigned
char
*
)
buf
)[
i
*
3
*
f
->
channels
+
3
*
j
]
&
0xff
))
/
8388608
.
0
f
;
}
}
}
else
{
fprintf
(
stderr
,
_
(
"Big endian 24 bit PCM data is not currently "
"supported, aborting.
\n
"
));
return
0
;
}
}
else
{
fprintf
(
stderr
,
_
(
"Internal error: attempt to read unsupported "
"bitdepth %d
\n
"
),
f
->
samplesize
);
return
0
;
}
return
realsamples
;
}
...
...
@@ -594,7 +622,6 @@ static long read_resampled(void *d, float **buffer, int samples)
resampler
*
rs
=
d
;
long
in_samples
;
int
out_samples
;
int
i
;
in_samples
=
res_push_max_input
(
&
rs
->
resampler
,
samples
);
if
(
in_samples
>
rs
->
bufsize
)
...
...
oggenc/oggenc.c
View file @
a5d8b7bc
...
...
@@ -439,11 +439,11 @@ static void usage(void)
" once, for example, and have it used for all the files)
\n
"
"
\n
"
"INPUT FILES:
\n
"
" OggEnc input files must currently be
16
or 8 bit PCM WAV, AIFF, or AIFF/C
\n
"
" OggEnc input files must currently be
24, 16,
or 8 bit PCM WAV, AIFF, or AIFF/C
\n
"
" files, or 32 bit IEEE floating point WAV. Files may be mono or stereo
\n
"
" (or more channels) and any sample rate.
\n
"
" Alternatively, the --raw option may be used to use a raw PCM data file, which
\n
"
" must be 16bit stereo little-endian PCM ('headerless wav'), unless additional
\n
"
" must be 16
bit stereo little-endian PCM ('headerless wav'), unless additional
\n
"
" parameters for raw mode are specified.
\n
"
" You can specify taking the file from stdin by using - as the input filename.
\n
"
" In this mode, output is to stdout unless an output filename is specified
\n
"
...
...
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