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
b677e891
Commit
b677e891
authored
Nov 24, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/{mikmod,modplug}: throw exception instead of calling FatalError()
parent
509f62f6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
8 deletions
+6
-8
MikmodDecoderPlugin.cxx
src/decoder/plugins/MikmodDecoderPlugin.cxx
+3
-3
ModplugDecoderPlugin.cxx
src/decoder/plugins/ModplugDecoderPlugin.cxx
+3
-3
SidplayDecoderPlugin.cxx
src/decoder/plugins/SidplayDecoderPlugin.cxx
+0
-1
WildmidiDecoderPlugin.cxx
src/decoder/plugins/WildmidiDecoderPlugin.cxx
+0
-1
No files found.
src/decoder/plugins/MikmodDecoderPlugin.cxx
View file @
b677e891
...
...
@@ -21,9 +21,9 @@
#include "MikmodDecoderPlugin.hxx"
#include "../DecoderAPI.hxx"
#include "tag/TagHandler.hxx"
#include "system/FatalError.hxx"
#include "fs/Path.hxx"
#include "util/Domain.hxx"
#include "util/RuntimeError.hxx"
#include "Log.hxx"
#include <mikmod.h>
...
...
@@ -116,8 +116,8 @@ mikmod_decoder_init(const ConfigBlock &block)
mikmod_loop
=
block
.
GetBlockValue
(
"loop"
,
false
);
mikmod_sample_rate
=
block
.
GetBlockValue
(
"sample_rate"
,
44100u
);
if
(
!
audio_valid_sample_rate
(
mikmod_sample_rate
))
FormatFatal
Error
(
"Invalid sample rate in line %d: %u"
,
block
.
line
,
mikmod_sample_rate
);
throw
FormatRuntime
Error
(
"Invalid sample rate in line %d: %u"
,
block
.
line
,
mikmod_sample_rate
);
md_device
=
0
;
md_reverb
=
0
;
...
...
src/decoder/plugins/ModplugDecoderPlugin.cxx
View file @
b677e891
...
...
@@ -22,9 +22,9 @@
#include "../DecoderAPI.hxx"
#include "input/InputStream.hxx"
#include "tag/TagHandler.hxx"
#include "system/FatalError.hxx"
#include "util/WritableBuffer.hxx"
#include "util/Domain.hxx"
#include "util/RuntimeError.hxx"
#include "Log.hxx"
#include <libmodplug/modplug.h>
...
...
@@ -45,8 +45,8 @@ modplug_decoder_init(const ConfigBlock &block)
{
modplug_loop_count
=
block
.
GetBlockValue
(
"loop_count"
,
0
);
if
(
modplug_loop_count
<
-
1
)
FormatFatal
Error
(
"Invalid loop count in line %d: %i"
,
block
.
line
,
modplug_loop_count
);
throw
FormatRuntime
Error
(
"Invalid loop count in line %d: %i"
,
block
.
line
,
modplug_loop_count
);
return
true
;
}
...
...
src/decoder/plugins/SidplayDecoderPlugin.cxx
View file @
b677e891
...
...
@@ -29,7 +29,6 @@
#include "util/FormatString.hxx"
#include "util/Domain.hxx"
#include "system/ByteOrder.hxx"
#include "system/FatalError.hxx"
#include "Log.hxx"
#ifdef HAVE_SIDPLAYFP
...
...
src/decoder/plugins/WildmidiDecoderPlugin.cxx
View file @
b677e891
...
...
@@ -25,7 +25,6 @@
#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
#include "fs/Path.hxx"
#include "system/FatalError.hxx"
#include "Log.hxx"
extern
"C"
{
...
...
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