Skip to content

Commit

Permalink
remove unused member
Browse files Browse the repository at this point in the history
  • Loading branch information
toxieainc committed Jan 4, 2024
1 parent 816cc98 commit a5068d0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
11 changes: 5 additions & 6 deletions src/altsound_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ AltsoundProcessor::AltsoundProcessor(const string& game_name_in,
:AltsoundProcessorBase(game_name_in, vpm_path_in),
format(format_in),
is_initialized(false),
is_stable(true), // future use
cmds()
is_stable(true) // future use
{
}

Expand Down Expand Up @@ -161,7 +160,7 @@ bool AltsoundProcessor::handleCmd(const unsigned int cmd_combined_in)

// update stream storage
channel_stream[new_stream->channel_idx] = new_stream;

play_music = true; // Defer playback until the end
cur_mus_stream = new_stream;
stream = cur_mus_stream->hstream;
Expand Down Expand Up @@ -220,7 +219,7 @@ bool AltsoundProcessor::handleCmd(const unsigned int cmd_combined_in)
if (!BASS_ChannelPlay(stream, 0)) {
// Sound playback failed
ALT_ERROR(0, "FAILED BASS_ChannelPlay(%u): %s", new_stream->hstream,\
get_bass_err());
get_bass_err());
}
else {
ALT_INFO(0, "SUCCESS BASS_ChannelPlay(%u): CH(%d) CMD(%04X) SAMPLE(%s)", \
Expand Down Expand Up @@ -274,7 +273,7 @@ bool AltsoundProcessor::loadSamples()

string altsound_path = vpm_path; // in base class
if (!altsound_path.empty()) {
altsound_path += string() + "altsound/" + game_name + '/';
altsound_path += "altsound/" + game_name + '/';
}

if (format == "altsound") {
Expand All @@ -293,7 +292,7 @@ bool AltsoundProcessor::loadSamples()
AltsoundFileParser file_parser(altsound_path);
if (!file_parser.parse(samples)) {
ALT_ERROR(0, "FAILED AltsoundFileParser::parse()");

ALT_OUTDENT;
ALT_DEBUG(0, "END AltsoundProcessor::loadSamples");
return false;
Expand Down
23 changes: 11 additions & 12 deletions src/altsound_processor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class AltsoundProcessor final : public AltsoundProcessorBase

// Standard constructor
AltsoundProcessor(const string& game_name_in,
const string& vpm_path_in,
const string& format_in);
const string& vpm_path_in,
const string& format_in);

// Destructor
~AltsoundProcessor();
Expand All @@ -53,17 +53,17 @@ class AltsoundProcessor final : public AltsoundProcessorBase
protected:

private: // functions

//
void init() override;

// parse CSV file and populate sample data
bool loadSamples() override;

// find sample matching provided command
unsigned int getSample(const unsigned int cmd_combined_in) override;
//

//
bool stopMusicStream();

// Stop currently-playing MUSIC stream
Expand All @@ -74,28 +74,27 @@ class AltsoundProcessor final : public AltsoundProcessorBase

// process music commands
bool process_music(AltsoundStreamInfo* stream_out);

// process jingle commands
bool process_jingle(AltsoundStreamInfo* stream_out);

// process sfx commands
bool process_sfx(AltsoundStreamInfo* stream_out);

// BASS SYNCPROC callback when jingle samples end
static void CALLBACK jingle_callback(HSYNC handle, DWORD channel, DWORD data, void *user);

// BASS SYNCPROC callback when sfx samples end
static void CALLBACK sfx_callback(HSYNC handle, DWORD channel, DWORD data, void *user);

// BASS SYNCPROC callback when music samples end
static void CALLBACK music_callback(HSYNC handle, DWORD channel, DWORD data, void *user);

private: // data

std::string format;
bool is_initialized;
bool is_stable; // future use
CmdData cmds;
std::vector<AltsoundSampleInfo> samples;
};

Expand Down

0 comments on commit a5068d0

Please sign in to comment.