summaryrefslogtreecommitdiff
path: root/drivers/chibi
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-07-07 23:27:42 +0200
committerGitHub <noreply@github.com>2016-07-07 23:27:42 +0200
commitf1e1910ae435c255745773bf37a60d798f9412fb (patch)
tree7e028a2da14765378e5eee7f71b434bde5038705 /drivers/chibi
parent1b9433594ecc6c935c81e9030a6b52c7b56cb3a4 (diff)
parent454b210242ec15a9928324757f27989216bc5a59 (diff)
Merge pull request #5538 from akien-mga/pr-unused-var
Removed unused variables + dead code
Diffstat (limited to 'drivers/chibi')
-rw-r--r--drivers/chibi/cp_envelope.cpp1
-rw-r--r--drivers/chibi/cp_loader_xm.cpp4
-rw-r--r--drivers/chibi/cp_player_data_events.cpp8
3 files changed, 3 insertions, 10 deletions
diff --git a/drivers/chibi/cp_envelope.cpp b/drivers/chibi/cp_envelope.cpp
index fab8a68ada..9892b6d4b0 100644
--- a/drivers/chibi/cp_envelope.cpp
+++ b/drivers/chibi/cp_envelope.cpp
@@ -359,7 +359,6 @@ uint8_t CPEnvelope::get_node_count() {
const CPEnvelope::Point& CPEnvelope::get_node(int p_idx) {
- static Point errpoint;
if (p_idx<0 || p_idx>=node_count)
return node[node_count-1];
diff --git a/drivers/chibi/cp_loader_xm.cpp b/drivers/chibi/cp_loader_xm.cpp
index 8ab6abc650..bff8615a32 100644
--- a/drivers/chibi/cp_loader_xm.cpp
+++ b/drivers/chibi/cp_loader_xm.cpp
@@ -560,8 +560,7 @@ CPLoader::Error CPLoader_XM::load_instrument_internal(CPInstrument *p_instr,bool
if (s_idx==-1) ABORT_LOAD;
//printf("free sample: %i\n",s_idx);
-
- char auxb;
+
CPSample& sample=*song->get_sample(s_idx);
int sample_size=file->get_dword();
@@ -611,6 +610,7 @@ CPLoader::Error CPLoader_XM::load_instrument_internal(CPInstrument *p_instr,bool
sm->set_c5_freq( sample_data, CPTables::get_linear_frequency(CPTables::get_linear_period(note_offset<<1,finetune)) );
//printf("NOTE %i,fine %i\n",note_offset,finetune);
+ char auxb;
auxb=file->get_byte(); //reserved?
file->get_byte_array((uint8_t*)instrname,22);
sample.set_name(instrname);
diff --git a/drivers/chibi/cp_player_data_events.cpp b/drivers/chibi/cp_player_data_events.cpp
index 8122988516..fb5090461b 100644
--- a/drivers/chibi/cp_player_data_events.cpp
+++ b/drivers/chibi/cp_player_data_events.cpp
@@ -325,8 +325,6 @@ void CPPlayer::update_mixer() {
printf("cgb %i\n",(int)v.master_channel->channel_global_volume);
*/
-
- int cv=v.master_channel->channel_global_volume;
tmpvol=(uint64_t)v.fadeout_volume; /* max 1024 - 10 bits */
tmpvol*=(uint64_t)v.channel_volume; /* * max 64 - 6 bits */
@@ -338,13 +336,9 @@ void CPPlayer::update_mixer() {
tmpvol*=(uint64_t)song->get_mixing_volume(); /* max 128 - 7 bits */
tmpvol*=(uint64_t)control.global_volume; /* max 128 - 7 bits*/
/* total 10+6+8+6+7+7=44 bits */
- uint64_t preshift=tmpvol;
+
tmpvol>>=43; /* Move back to 8 bits range , 44-19+8=43*/
- /*
- if (!tmpvol && preshift>>35)
- tmpvol=1; // even if the volume should be inaudible, some people WANTS to hear this.
- */
if (tmpvol>CP_VOL_MAX)
tmpvol=CP_VOL_MAX;