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
9b4156a2
Commit
9b4156a2
authored
Jul 07, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/audiofile: add "noexcept"
parent
89b1e27d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
AudiofileDecoderPlugin.cxx
src/decoder/plugins/AudiofileDecoderPlugin.cxx
+11
-10
No files found.
src/decoder/plugins/AudiofileDecoderPlugin.cxx
View file @
9b4156a2
...
...
@@ -38,7 +38,7 @@
static
constexpr
Domain
audiofile_domain
(
"audiofile"
);
static
void
audiofile_error_func
(
long
,
const
char
*
msg
)
audiofile_error_func
(
long
,
const
char
*
msg
)
noexcept
{
LogWarning
(
audiofile_domain
,
msg
);
}
...
...
@@ -54,7 +54,7 @@ struct AudioFileInputStream {
DecoderClient
*
const
client
;
InputStream
&
is
;
size_t
Read
(
void
*
buffer
,
size_t
size
)
{
size_t
Read
(
void
*
buffer
,
size_t
size
)
noexcept
{
/* libaudiofile does not like partial reads at all,
and will abort playback; therefore always force full
reads */
...
...
@@ -73,7 +73,7 @@ audiofile_get_duration(AFfilehandle fh) noexcept
}
static
ssize_t
audiofile_file_read
(
AFvirtualfile
*
vfile
,
void
*
data
,
size_t
length
)
audiofile_file_read
(
AFvirtualfile
*
vfile
,
void
*
data
,
size_t
length
)
noexcept
{
AudioFileInputStream
&
afis
=
*
(
AudioFileInputStream
*
)
vfile
->
closure
;
...
...
@@ -81,7 +81,7 @@ audiofile_file_read(AFvirtualfile *vfile, void *data, size_t length)
}
static
AFfileoffset
audiofile_file_length
(
AFvirtualfile
*
vfile
)
audiofile_file_length
(
AFvirtualfile
*
vfile
)
noexcept
{
AudioFileInputStream
&
afis
=
*
(
AudioFileInputStream
*
)
vfile
->
closure
;
InputStream
&
is
=
afis
.
is
;
...
...
@@ -90,7 +90,7 @@ audiofile_file_length(AFvirtualfile *vfile)
}
static
AFfileoffset
audiofile_file_tell
(
AFvirtualfile
*
vfile
)
audiofile_file_tell
(
AFvirtualfile
*
vfile
)
noexcept
{
AudioFileInputStream
&
afis
=
*
(
AudioFileInputStream
*
)
vfile
->
closure
;
InputStream
&
is
=
afis
.
is
;
...
...
@@ -99,7 +99,7 @@ audiofile_file_tell(AFvirtualfile *vfile)
}
static
void
audiofile_file_destroy
(
AFvirtualfile
*
vfile
)
audiofile_file_destroy
(
AFvirtualfile
*
vfile
)
noexcept
{
assert
(
vfile
->
closure
!=
nullptr
);
...
...
@@ -108,7 +108,7 @@ audiofile_file_destroy(AFvirtualfile *vfile)
static
AFfileoffset
audiofile_file_seek
(
AFvirtualfile
*
vfile
,
AFfileoffset
_offset
,
int
is_relative
)
int
is_relative
)
noexcept
{
AudioFileInputStream
&
afis
=
*
(
AudioFileInputStream
*
)
vfile
->
closure
;
InputStream
&
is
=
afis
.
is
;
...
...
@@ -127,7 +127,7 @@ audiofile_file_seek(AFvirtualfile *vfile, AFfileoffset _offset,
}
static
AFvirtualfile
*
setup_virtual_fops
(
AudioFileInputStream
&
afis
)
setup_virtual_fops
(
AudioFileInputStream
&
afis
)
noexcept
{
AFvirtualfile
*
vf
=
new
AFvirtualfile
();
vf
->
closure
=
&
afis
;
...
...
@@ -140,8 +140,9 @@ setup_virtual_fops(AudioFileInputStream &afis)
return
vf
;
}
gcc_const
static
SampleFormat
audiofile_bits_to_sample_format
(
int
bits
)
audiofile_bits_to_sample_format
(
int
bits
)
noexcept
{
switch
(
bits
)
{
case
8
:
...
...
@@ -161,7 +162,7 @@ audiofile_bits_to_sample_format(int bits)
}
static
SampleFormat
audiofile_setup_sample_format
(
AFfilehandle
af_fp
)
audiofile_setup_sample_format
(
AFfilehandle
af_fp
)
noexcept
{
int
fs
,
bits
;
...
...
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