taisei/src/audio_mixer.h
Andrei Alexeyev 513d613387
Consistent indentation: indent with tabs, align with spaces (#104)
I would've preferred to just go with 4-spaces for indent and no tabs,
but lao is a bit conservative about it. :^)

Still, this is a ton better than mixing different styles all over the
place, especially within the same file.
2018-01-12 20:26:07 +02:00

31 lines
941 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* This software is licensed under the terms of the MIT-License
* See COPYING for further information.
* ---
* Copyright (c) 2011-2018, Lukas Weber <laochailan@web.de>.
* Copyright (c) 2012-2018, Andrei Alexeyev <akari@alienslab.net>.
*/
#pragma once
#include "taisei.h"
#include <SDL_mixer.h>
#include <stdbool.h>
// I needed to add this for supporting loop sounds since Mixer doesnt remember
// what channel a sound is playing on.
typedef struct {
Mix_Chunk *ch;
int loopchan; // channel the sound may be looping on. -1 if not looping
int playchan; // channel the sound was last played on (looping does NOT set this). -1 if never played
} MixerInternalSound;
typedef struct MixerInternalMusic {
Mix_Music *intro;
Mix_Music *loop;
double loop_point;
} MixerInternalMusic;
char* audio_mixer_sound_path(const char *prefix, const char *name, bool isbgm);
bool audio_mixer_check_sound_path(const char *path, bool isbgm);