BSoftSynth: pointer style, 80 column limit
This commit is contained in:
@@ -254,7 +254,8 @@ BSoftSynth::SetReverb(reverb_mode mode)
|
|||||||
if (fSynth) {
|
if (fSynth) {
|
||||||
// We access the table using "mode - 1" because B_REVERB_NONE == 1
|
// We access the table using "mode - 1" because B_REVERB_NONE == 1
|
||||||
ReverbSettings *rvb = &gReverbSettings[mode - 1];
|
ReverbSettings *rvb = &gReverbSettings[mode - 1];
|
||||||
fluid_synth_set_reverb(fSynth, rvb->room, rvb->damp, rvb->width, rvb->level);
|
fluid_synth_set_reverb(fSynth, rvb->room, rvb->damp, rvb->width,
|
||||||
|
rvb->level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -521,15 +522,18 @@ BSoftSynth::_Done()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BSoftSynth::PlayBuffer(void * cookie, void * data, size_t size, const media_raw_audio_format & format)
|
BSoftSynth::PlayBuffer(void* cookie, void* data, size_t size,
|
||||||
|
const media_raw_audio_format& format)
|
||||||
{
|
{
|
||||||
BSoftSynth *synth = (BSoftSynth *)cookie;
|
BSoftSynth* synth = (BSoftSynth*)cookie;
|
||||||
|
|
||||||
// we use float samples
|
// we use float samples
|
||||||
|
|
||||||
if (synth->fSynth)
|
if (synth->fSynth) {
|
||||||
fluid_synth_write_float(synth->fSynth, size / sizeof(float) / format.channel_count,
|
fluid_synth_write_float(
|
||||||
|
synth->fSynth, size / sizeof(float) / format.channel_count,
|
||||||
data, 0, format.channel_count,
|
data, 0, format.channel_count,
|
||||||
data, 1, format.channel_count);
|
data, 1, format.channel_count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,10 +29,8 @@ class BSynth;
|
|||||||
|
|
||||||
namespace BPrivate {
|
namespace BPrivate {
|
||||||
|
|
||||||
class BSoftSynth
|
class BSoftSynth {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
bool InitCheck();
|
bool InitCheck();
|
||||||
|
|
||||||
void Unload();
|
void Unload();
|
||||||
@@ -93,7 +91,8 @@ private:
|
|||||||
|
|
||||||
void _Init();
|
void _Init();
|
||||||
void _Done();
|
void _Done();
|
||||||
static void PlayBuffer(void * cookie, void * data, size_t size, const media_raw_audio_format & format);
|
static void PlayBuffer(void* cookie, void* data, size_t size,
|
||||||
|
const media_raw_audio_format& format);
|
||||||
|
|
||||||
bool fInitCheck;
|
bool fInitCheck;
|
||||||
char* fInstrumentsFile;
|
char* fInstrumentsFile;
|
||||||
@@ -104,10 +103,10 @@ private:
|
|||||||
reverb_mode fReverbMode;
|
reverb_mode fReverbMode;
|
||||||
bool fReverbEnabled;
|
bool fReverbEnabled;
|
||||||
|
|
||||||
fluid_synth_t *fSynth;
|
fluid_synth_t* fSynth;
|
||||||
fluid_settings_t* fSettings;
|
fluid_settings_t* fSettings;
|
||||||
|
|
||||||
BSoundPlayer *fSoundPlayer;
|
BSoundPlayer* fSoundPlayer;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace BPrivate
|
} // namespace BPrivate
|
||||||
|
|||||||
Reference in New Issue
Block a user