Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Cave-Crawler/AudioH.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
22 lines (21 sloc)
418 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "SDL.h" | |
class Audio { | |
public: | |
~Audio(); | |
//// Load the audio file //// | |
void load(const char* fileName); | |
//// Play the audio file //// | |
void play(); | |
//// Stop playing the Audio file //// | |
void stop(); | |
private: | |
//// AUDIO SPEC //// | |
SDL_AudioSpec wavSpec; | |
//// .wav Length //// | |
Uint32 wavLength; | |
//// .wav Buffer //// | |
Uint8 *wavBuffer; | |
//// Audio Device ID //// | |
SDL_AudioDeviceID deviceId; | |
}; |