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
d65d6548
Commit
d65d6548
authored
Oct 31, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oggflac: adapt to new API
Again, I forgot to adapt oggflac to the new API (struct input_stream, bool return values).
parent
5024f0b6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
oggflac_plugin.c
src/decoder/oggflac_plugin.c
+6
-6
No files found.
src/decoder/oggflac_plugin.c
View file @
d65d6548
...
@@ -256,7 +256,7 @@ fail:
...
@@ -256,7 +256,7 @@ fail:
/* public functions: */
/* public functions: */
static
struct
tag
*
oggflac_TagDup
(
char
*
file
)
static
struct
tag
*
oggflac_TagDup
(
char
*
file
)
{
{
InputS
tream
inStream
;
struct
input_s
tream
inStream
;
OggFLAC__SeekableStreamDecoder
*
decoder
;
OggFLAC__SeekableStreamDecoder
*
decoder
;
FlacData
data
;
FlacData
data
;
...
@@ -279,7 +279,7 @@ static struct tag *oggflac_TagDup(char *file)
...
@@ -279,7 +279,7 @@ static struct tag *oggflac_TagDup(char *file)
return
data
.
tag
;
return
data
.
tag
;
}
}
static
bool
oggflac_try_decode
(
InputStream
*
inStream
)
static
bool
oggflac_try_decode
(
struct
input_stream
*
inStream
)
{
{
if
(
!
inStream
->
seekable
)
if
(
!
inStream
->
seekable
)
/* we cannot seek after the detection, so don't bother
/* we cannot seek after the detection, so don't bother
...
@@ -289,16 +289,17 @@ static bool oggflac_try_decode(InputStream * inStream)
...
@@ -289,16 +289,17 @@ static bool oggflac_try_decode(InputStream * inStream)
return
ogg_stream_type_detect
(
inStream
)
==
FLAC
;
return
ogg_stream_type_detect
(
inStream
)
==
FLAC
;
}
}
static
int
oggflac_decode
(
struct
decoder
*
mpd_decoder
,
InputStream
*
inStream
)
static
bool
oggflac_decode
(
struct
decoder
*
mpd_decoder
,
struct
input_stream
*
inStream
)
{
{
OggFLAC__SeekableStreamDecoder
*
decoder
=
NULL
;
OggFLAC__SeekableStreamDecoder
*
decoder
=
NULL
;
FlacData
data
;
FlacData
data
;
int
ret
=
0
;
bool
ret
=
true
;
init_FlacData
(
&
data
,
mpd_decoder
,
inStream
);
init_FlacData
(
&
data
,
mpd_decoder
,
inStream
);
if
(
!
(
decoder
=
full_decoder_init_and_read_metadata
(
&
data
,
0
)))
{
if
(
!
(
decoder
=
full_decoder_init_and_read_metadata
(
&
data
,
0
)))
{
ret
=
-
1
;
ret
=
false
;
goto
fail
;
goto
fail
;
}
}
...
@@ -315,7 +316,6 @@ static int oggflac_decode(struct decoder * mpd_decoder, InputStream * inStream)
...
@@ -315,7 +316,6 @@ static int oggflac_decode(struct decoder * mpd_decoder, InputStream * inStream)
data
.
audio_format
.
sample_rate
+
0
.
5
;
data
.
audio_format
.
sample_rate
+
0
.
5
;
if
(
OggFLAC__seekable_stream_decoder_seek_absolute
if
(
OggFLAC__seekable_stream_decoder_seek_absolute
(
decoder
,
sampleToSeek
))
{
(
decoder
,
sampleToSeek
))
{
decoder_clear
(
mpd_decoder
);
data
.
time
=
((
float
)
sampleToSeek
)
/
data
.
time
=
((
float
)
sampleToSeek
)
/
data
.
audio_format
.
sample_rate
;
data
.
audio_format
.
sample_rate
;
data
.
position
=
0
;
data
.
position
=
0
;
...
...
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