From 389293f3716ebcd36e52e1e6c726ccc76192607d Mon Sep 17 00:00:00 2001 From: Clortox <45907232+Clortox@users.noreply.github.com> Date: Fri, 8 Nov 2019 12:53:09 -0500 Subject: [PATCH] Update README.md --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1695397..2cf6e1a 100644 --- a/README.md +++ b/README.md @@ -1 +1,64 @@ -# Wavehpp \ No newline at end of file +# Wavehpp +Simple wrapper for PlaySound() in the winodws.h library +This is my first time trying to create something like this outside of class +Use with care :) + +*** + +## Usage +### Public Methods + +- wave::wave() + - defualt ctor (not recomended for usage) + +- wave::wave(std::string&) + - takes path to .wav file to load + +- wave::wave(const wave&) + - copy ctor + +- wave::~wave() + - destructor + +- wave& wave::operator=(wave&) + - asignment operator + +- wave::swap(wave&) + - swap + +- bool wave::isOk() const + - check if the wav file was loaded properly and is ready to be played + +- wave::play(bool) + - play the loaded file + - Note: passing false will pause execution till the file has finished playing + - However, passing true will let execution continue normally will the sound plays + +- wave::resign(std::string&) + - loads a new file into memory to play from the provided path + +- std::string wave::dumpbuffer() const + - will output the file buffer + +*** + +### Private Methods + +- bool wave::isWave(std::string&) + - returns true if the magic bytes at the beggining of the file indicate a wav file (RIFF....WAVE) + +*** + +### Private Values + +- wave::buffer + - char* ; points to the buffer where the file is stored on the heap + +- wave::HInstance + - HINSTANCE ; used by windows to tell different windows and similar processes apart + +- wave::isok + - bool ; stores weather or not the file is ready to be played + +- wave::buffsize + - int ; size of the file buffer