Skip to content

Commit

Permalink
Untabify my audio log changes
Browse files Browse the repository at this point in the history
Okay that rebase was less painless than I feared. Good to know for the
entire localization branch.............................................

Note to self, Misa's untabify action:
TerryCavanagh@c64fd89

Merge/Rebase treating sequences of one or more whitespace characters
as equivalent:
git merge/rebase -Xignore-space-change
  • Loading branch information
Daaaav committed Sep 20, 2021
1 parent 10bea0c commit 9308f9c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 51 deletions.
86 changes: 43 additions & 43 deletions desktop_version/src/Music.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,46 +29,46 @@ musicclass::musicclass(void)

usingmmmmmm = false;

audio_log_started = false;
start_audio_log();
audio_log_started = false;
start_audio_log();
}

void musicclass::audio_log_set_timestamp(void)
{
clock_gettime(CLOCK_REALTIME, &audio_log_t);
sprintf(audio_log_timestring_lol, "%lu.%lu", audio_log_t.tv_sec, audio_log_t.tv_nsec);
clock_gettime(CLOCK_REALTIME, &audio_log_t);
sprintf(audio_log_timestring_lol, "%lu.%lu", audio_log_t.tv_sec, audio_log_t.tv_nsec);
}

void musicclass::start_audio_log(void)
{
if (audio_log_started)
{
log_audio("end");
if (audio_log_started)
{
log_audio("end");

printf("AUDIO LOG %s CLOSED\n", audio_log_timestring_lol);
fclose(audio_log_file);
}
printf("AUDIO LOG %s CLOSED\n", audio_log_timestring_lol);
fclose(audio_log_file);
}

audio_log_set_timestamp();
audio_log_set_timestamp();

char audio_log_filename[256];
sprintf(audio_log_filename, "/home/david/v-audio-log/%s", audio_log_timestring_lol);
audio_log_file = fopen(audio_log_filename, "a");
char audio_log_filename[256];
sprintf(audio_log_filename, "/home/david/v-audio-log/%s", audio_log_timestring_lol);
audio_log_file = fopen(audio_log_filename, "a");

printf("AUDIO LOG STARTED AT %s\n", audio_log_filename);
printf("AUDIO LOG STARTED AT %s\n", audio_log_filename);

char aubuf[110];
sprintf(aubuf, "start %s", audio_log_timestring_lol);
log_audio(aubuf);
char aubuf[110];
sprintf(aubuf, "start %s", audio_log_timestring_lol);
log_audio(aubuf);

audio_log_started = true;
audio_log_started = true;
}

void musicclass::log_audio(const char *logged)
{
audio_log_set_timestamp();
audio_log_set_timestamp();

fprintf(audio_log_file, "%s %s\n", audio_log_timestring_lol, logged);
fprintf(audio_log_file, "%s %s\n", audio_log_timestring_lol, logged);
}

void musicclass::init(void)
Expand Down Expand Up @@ -230,7 +230,7 @@ void musicclass::destroy(void)
pppppp_blob.clear();
mmmmmm_blob.clear();

start_audio_log();
start_audio_log();
}

void musicclass::play(int t)
Expand Down Expand Up @@ -260,9 +260,9 @@ void musicclass::play(int t)
return;
}

char aubuf[100];
sprintf(aubuf, "play %d", t);
log_audio(aubuf);
char aubuf[100];
sprintf(aubuf, "play %d", t);
log_audio(aubuf);

currentsong = t;

Expand Down Expand Up @@ -326,16 +326,16 @@ void musicclass::play(int t)

void musicclass::resume()
{
log_audio("resume");
log_audio("resume");

Mix_ResumeMusic();
}

void musicclass::resumefade(const int fadein_ms)
{
char aubuf[100];
sprintf(aubuf, "resumefade %d", fadein_ms);
log_audio(aubuf);
char aubuf[100];
sprintf(aubuf, "resumefade %d", fadein_ms);
log_audio(aubuf);

resume();
fadeMusicVolumeIn(fadein_ms);
Expand All @@ -348,14 +348,14 @@ void musicclass::fadein(void)

void musicclass::pause(void)
{
log_audio("pause");
log_audio("pause");

Mix_PauseMusic();
}

void musicclass::haltdasmusik(void)
{
log_audio("haltdasmusik");
log_audio("haltdasmusik");

/* Just pauses music. This is intended. */
pause();
Expand All @@ -366,7 +366,7 @@ void musicclass::haltdasmusik(void)

void musicclass::silencedasmusik(void)
{
log_audio("silencedasmusik");
log_audio("silencedasmusik");

musicVolume = 0;
m_doFadeInVol = false;
Expand Down Expand Up @@ -445,9 +445,9 @@ void musicclass::fadeMusicVolumeOut(const int fadeout_ms)
{
return;
}
char aubuf[100];
sprintf(aubuf, "fadeMusicVolumeOut %d", fadeout_ms);
log_audio(aubuf);
char aubuf[100];
sprintf(aubuf, "fadeMusicVolumeOut %d", fadeout_ms);
log_audio(aubuf);

m_doFadeInVol = false;
m_doFadeOutVol = true;
Expand Down Expand Up @@ -514,9 +514,9 @@ void musicclass::processmusic(void)

void musicclass::niceplay(int t)
{
char aubuf[100];
sprintf(aubuf, "niceplay %d", t);
log_audio(aubuf);
char aubuf[100];
sprintf(aubuf, "niceplay %d", t);
log_audio(aubuf);

/* important: do nothing if the correct song is playing! */
if ((!mmmmmm && currentsong != t)
Expand Down Expand Up @@ -611,9 +611,9 @@ void musicclass::changemusicarea(int x, int y)

void musicclass::playef(int t)
{
char aubuf[100];
sprintf(aubuf, "playef %d", t);
log_audio(aubuf);
char aubuf[100];
sprintf(aubuf, "playef %d", t);
log_audio(aubuf);

if (!INBOUNDS_VEC(t, soundTracks))
{
Expand All @@ -630,14 +630,14 @@ void musicclass::playef(int t)

void musicclass::pauseef(void)
{
log_audio("pauseef");
log_audio("pauseef");

Mix_Pause(-1);
}

void musicclass::resumeef(void)
{
log_audio("resumeef");
log_audio("resumeef");

Mix_Resume(-1);
}
Expand Down
16 changes: 8 additions & 8 deletions desktop_version/src/Music.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class musicclass
void init(void);
void destroy(void);

void start_audio_log(void);
void log_audio(const char *logged);
void audio_log_set_timestamp(void);
void start_audio_log(void);
void log_audio(const char *logged);
void audio_log_set_timestamp(void);

void play(int t);
void resume();
Expand Down Expand Up @@ -79,12 +79,12 @@ class musicclass
int num_pppppp_tracks;
int num_mmmmmm_tracks;

// Audio log
struct timespec audio_log_t;
char audio_log_timestring_lol[100];
// Audio log
struct timespec audio_log_t;
char audio_log_timestring_lol[100];

bool audio_log_started;
FILE *audio_log_file;
bool audio_log_started;
FILE *audio_log_file;
};

#ifndef MUSIC_DEFINITION
Expand Down

0 comments on commit 9308f9c

Please sign in to comment.