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
f5670830
Commit
f5670830
authored
May 15, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main: refactor DEFAULT_BUFFER_SIZE to represent bytes
parent
a2a677e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Main.cxx
src/Main.cxx
+5
-4
No files found.
src/Main.cxx
View file @
f5670830
...
...
@@ -117,7 +117,10 @@
#include <limits.h>
static
constexpr
unsigned
DEFAULT_BUFFER_SIZE
=
4096
;
static
constexpr
size_t
KILOBYTE
=
1024
;
static
constexpr
size_t
MEGABYTE
=
1024
*
KILOBYTE
;
static
constexpr
size_t
DEFAULT_BUFFER_SIZE
=
4
*
MEGABYTE
;
static
constexpr
unsigned
DEFAULT_BUFFER_BEFORE_PLAY
=
10
;
#ifdef ANDROID
...
...
@@ -306,12 +309,10 @@ initialize_decoder_and_player(const ReplayGainConfig &replay_gain_config)
FormatFatalError
(
"buffer size
\"
%s
\"
is not a "
"positive integer, line %i"
,
param
->
value
.
c_str
(),
param
->
line
);
buffer_size
=
tmp
;
buffer_size
=
tmp
*
KILOBYTE
;
}
else
buffer_size
=
DEFAULT_BUFFER_SIZE
;
buffer_size
*=
1024
;
const
unsigned
buffered_chunks
=
buffer_size
/
CHUNK_SIZE
;
if
(
buffered_chunks
>=
1
<<
15
)
...
...
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