- fixed compilation on XCode and silenced several warnings in the music code

This commit is contained in:
Christoph Oelckers 2019-09-27 01:42:56 +02:00
parent 621945905f
commit 315e15c7f0
8 changed files with 5 additions and 13 deletions

View file

@ -504,9 +504,9 @@ ADLMIDI_EXPORT void adl_setLoopEnabled(ADL_MIDIPlayer *device, int loopEn)
{
if(!device)
return;
MidiPlayer *play = GET_MIDI_PLAYER(device);
assert(play);
#ifndef ADLMIDI_DISABLE_MIDI_SEQUENCER
MidiPlayer *play = GET_MIDI_PLAYER(device);
assert(play);
play->m_sequencer.setLoopEnabled(loopEn != 0);
#else
ADL_UNUSED(loopEn);

View file

@ -45,6 +45,7 @@
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <limits>
#include "opl.h"

View file

@ -155,7 +155,6 @@ typedef struct operator_struct {
class DBOPL : public OPLEmul
{
private:
Bitu chip_num;
op_type op[MAXOPERATORS];
Bits int_samplerate;

View file

@ -552,8 +552,6 @@ static const int8_t lfo_pm_table[8*8*2] = {
};
/* lock level of common table */
static int num_lock = 0;
/* work table */
static signed int phase_modulation; /* phase modulation input (SLOT 2) */

View file

@ -258,7 +258,6 @@ bool OPLmusicBlock::ServiceStream (void *buff, int numbytes)
std::lock_guard<std::mutex> lock(ChipAccess);
while (numsamples > 0)
{
double ticky = NextTickIn;
int tick_in = int(NextTickIn);
int samplesleft = std::min(numsamples, tick_in);
size_t i;

View file

@ -361,9 +361,9 @@ OPNMIDI_EXPORT void opn2_setLoopEnabled(OPN2_MIDIPlayer *device, int loopEn)
{
if(!device)
return;
MidiPlayer *play = GET_MIDI_PLAYER(device);
assert(play);
#ifndef OPNMIDI_DISABLE_MIDI_SEQUENCER
MidiPlayer *play = GET_MIDI_PLAYER(device);
assert(play);
play->m_sequencer.setLoopEnabled(loopEn != 0);
#else
ADL_UNUSED(loopEn);

View file

@ -784,8 +784,6 @@ struct _sample * Instruments::load_gus_pat(const char *filename)
};
unsigned long int tmp_loop;
/*unused*/fix_release;
SAMPLE_CONVERT_DEBUG(__FUNCTION__); SAMPLE_CONVERT_DEBUG(filename);
if ((gus_patch = _WM_BufferFile(sfreader, filename, &gus_size)) == NULL) {

View file

@ -1666,7 +1666,6 @@ static void do_control_data_entry_course(struct _mdi *mdi,
void Renderer::do_control_channel_volume(struct _mdi *mdi, struct _event_data *data)
{
struct _note *note_data = mdi->note;
unsigned char ch = data->channel;
mdi->channel[ch].volume = (unsigned char)data->data;
@ -1691,7 +1690,6 @@ void Renderer::do_control_channel_pan(struct _mdi *mdi, struct _event_data *data
void Renderer::do_control_channel_expression(struct _mdi *mdi, struct _event_data *data)
{
struct _note *note_data = mdi->note;
unsigned char ch = data->channel;
mdi->channel[ch].expression = (unsigned char)data->data;
@ -1837,7 +1835,6 @@ static void do_control_channel_sound_off(struct _mdi *mdi,
void Renderer::do_control_channel_controllers_off(struct _mdi *mdi, struct _event_data *data)
{
struct _note *note_data = mdi->note;
unsigned char ch = data->channel;
mdi->channel[ch].expression = 127;