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
4e080a9b
Commit
4e080a9b
authored
May 31, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/gme: replace macro GME_BUF_SIZE
Added macros with better names: GME_BUFFER_FRAMES, GME_BUFFER_SAMPLES (the former only used to calculate the latter).
parent
d5574080
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
gme_decoder_plugin.c
src/decoder/gme_decoder_plugin.c
+5
-4
No files found.
src/decoder/gme_decoder_plugin.c
View file @
4e080a9b
...
...
@@ -8,11 +8,11 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "gme"
#define GME_BUF_SIZE 4096
enum
{
GME_SAMPLE_RATE
=
44100
,
GME_CHANNELS
=
2
,
GME_BUFFER_FRAMES
=
2048
,
GME_BUFFER_SAMPLES
=
GME_BUFFER_FRAMES
*
GME_CHANNELS
,
};
static
void
...
...
@@ -24,7 +24,7 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
gme_info_t
*
ti
;
struct
audio_format
audio_format
;
enum
decoder_command
cmd
;
short
buf
[
GME_BUF
_SIZE
];
short
buf
[
GME_BUF
FER_SAMPLES
];
const
char
*
gme_err
;
gme_err
=
gme_open_file
(
path_fs
,
&
emu
,
GME_SAMPLE_RATE
);
...
...
@@ -62,7 +62,8 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
/* play */
do
{
if
((
gme_err
=
gme_play
(
emu
,
GME_BUF_SIZE
,
buf
))
!=
NULL
){
gme_err
=
gme_play
(
emu
,
GME_BUFFER_SAMPLES
,
buf
);
if
(
gme_err
!=
NULL
)
{
g_warning
(
"%s"
,
gme_err
);
return
;
}
...
...
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