projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made code -Wshadow clean, missed a bunch of issues in the last commit
[supertux.git]
/
src
/
audio
/
ogg_sound_file.cpp
diff --git
a/src/audio/ogg_sound_file.cpp
b/src/audio/ogg_sound_file.cpp
index
5429b5a
..
ae5f06e
100644
(file)
--- a/
src/audio/ogg_sound_file.cpp
+++ b/
src/audio/ogg_sound_file.cpp
@@
-18,14
+18,14
@@
#include <assert.h>
#include <assert.h>
-OggSoundFile::OggSoundFile(PHYSFS_file* file
, double loop_begin, double loop_at
) :
+OggSoundFile::OggSoundFile(PHYSFS_file* file
_, double loop_begin_, double loop_at_
) :
file(),
vorbis_file(),
loop_begin(),
loop_at(),
normal_buffer_loop()
{
file(),
vorbis_file(),
loop_begin(),
loop_at(),
normal_buffer_loop()
{
- this->file = file;
+ this->file = file
_
;
ov_callbacks callbacks = { cb_read, cb_seek, cb_close, cb_tell };
ov_open_callbacks(file, &vorbis_file, 0, 0, callbacks);
ov_callbacks callbacks = { cb_read, cb_seek, cb_close, cb_tell };
ov_open_callbacks(file, &vorbis_file, 0, 0, callbacks);
@@
-37,11
+37,11
@@
OggSoundFile::OggSoundFile(PHYSFS_file* file, double loop_begin, double loop_at)
bits_per_sample = 16;
size = static_cast<size_t> (ov_pcm_total(&vorbis_file, -1) * 2);
bits_per_sample = 16;
size = static_cast<size_t> (ov_pcm_total(&vorbis_file, -1) * 2);
- double samples_begin = loop_begin * rate;
- double sample_loop = loop_at * rate;
+ double samples_begin = loop_begin
_
* rate;
+ double sample_loop = loop_at
_
* rate;
this->loop_begin = (ogg_int64_t) samples_begin;
this->loop_begin = (ogg_int64_t) samples_begin;
- if(loop_begin < 0) {
+ if(loop_begin
_
< 0) {
this->loop_at = (ogg_int64_t) -1;
} else {
this->loop_at = (ogg_int64_t) sample_loop;
this->loop_at = (ogg_int64_t) -1;
} else {
this->loop_at = (ogg_int64_t) sample_loop;