diff options
Diffstat (limited to 'drivers/chibi')
-rw-r--r-- | drivers/chibi/cp_envelope.cpp | 1 | ||||
-rw-r--r-- | drivers/chibi/cp_loader_xm.cpp | 4 | ||||
-rw-r--r-- | drivers/chibi/cp_player_data_events.cpp | 8 |
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; |