Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
42fac4e4
Commit
42fac4e4
authored
Aug 12, 2013
by
Tristan Matthews
Browse files
* #28344: audiofile: cleanup
parent
25af87d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/audio/sound/audiofile.cpp
View file @
42fac4e4
...
...
@@ -80,13 +80,10 @@ AudioFile::AudioFile(const std::string &fileName, unsigned int sampleRate) :
hasHeader
=
false
;
}
else
if
(
filepath_
.
find
(
".au"
)
!=
std
::
string
::
npos
)
{
format
=
SF_FORMAT_AU
;
hasHeader
=
true
;
}
else
if
(
filepath_
.
find
(
".flac"
)
!=
std
::
string
::
npos
)
{
format
=
SF_FORMAT_FLAC
;
hasHeader
=
true
;
}
else
if
(
filepath_
.
find
(
".ogg"
)
!=
std
::
string
::
npos
)
{
format
=
SF_FORMAT_OGG
;
hasHeader
=
true
;
}
else
{
WARN
(
"No file extension, guessing WAV"
);
format
=
SF_FORMAT_WAV
;
...
...
@@ -102,7 +99,6 @@ AudioFile::AudioFile(const std::string &fileName, unsigned int sampleRate) :
case
1
:
case
2
:
break
;
default:
throw
AudioFileException
(
"Unsupported number of channels"
);
}
...
...
Write
Preview
Supports
Markdown
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