Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
flac
Commits
8bc1cde8
Commit
8bc1cde8
authored
Sep 13, 2007
by
Josh Coalson
Browse files
minor improvements
parent
8679516b
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/c/decode/file/main.c
View file @
8bc1cde8
...
...
@@ -19,6 +19,9 @@
/*
* This example shows how to use libFLAC to decode a FLAC file to a WAVE
* file. It only supports 16-bit stereo files.
*
* Complete API documentation can be found at:
* http://flac.sourceforge.net/api/
*/
#if HAVE_CONFIG_H
...
...
@@ -33,10 +36,10 @@ static FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *
static
void
metadata_callback
(
const
FLAC__StreamDecoder
*
decoder
,
const
FLAC__StreamMetadata
*
metadata
,
void
*
client_data
);
static
void
error_callback
(
const
FLAC__StreamDecoder
*
decoder
,
FLAC__StreamDecoderErrorStatus
status
,
void
*
client_data
);
FLAC__uint64
total_samples
=
0
;
unsigned
sample_rate
=
0
;
unsigned
channels
=
0
;
unsigned
bps
=
0
;
static
FLAC__uint64
total_samples
=
0
;
static
unsigned
sample_rate
=
0
;
static
unsigned
channels
=
0
;
static
unsigned
bps
=
0
;
static
FLAC__bool
write_little_endian_uint16
(
FILE
*
f
,
FLAC__uint16
x
)
{
...
...
examples/cpp/decode/file/main.cpp
View file @
8bc1cde8
...
...
@@ -17,8 +17,11 @@
*/
/*
* This example shows how to use libFLAC to decode a FLAC file to a WAVE
* This example shows how to use libFLAC
++
to decode a FLAC file to a WAVE
* file. It only supports 16-bit stereo files.
*
* Complete API documentation can be found at:
* http://flac.sourceforge.net/api/
*/
#if HAVE_CONFIG_H
...
...
@@ -29,10 +32,10 @@
#include <stdlib.h>
#include "FLAC++/decoder.h"
FLAC__uint64
total_samples
=
0
;
unsigned
sample_rate
=
0
;
unsigned
channels
=
0
;
unsigned
bps
=
0
;
static
FLAC__uint64
total_samples
=
0
;
static
unsigned
sample_rate
=
0
;
static
unsigned
channels
=
0
;
static
unsigned
bps
=
0
;
static
bool
write_little_endian_uint16
(
FILE
*
f
,
FLAC__uint16
x
)
{
...
...
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