Coder Social home page Coder Social logo

tone-fire's Introduction

Tone Fire

A C++ Wrapper for both FMOD Core and FMOD Studio API, which makes it much easier to use.

Some Info

An example of how to use the FMOD Core Implementation:

int main(){
	ToneFire::FMODCore core;
	ToneFire::CoreSound _sound{ "test.mp3",true,true,false };
	_sound.Play();

    //Game Loop
	while (true) {
		core.Update();
	}
    return 0;
}

An example of how to use the FMOD Studio Implementation:

int main(){
    ToneFire::FMODStudio studio;

	studio.LoadBank("Master.bank");
	studio.LoadBank("Master.strings.bank");
	studio.LoadBank("Ghoul.bank");

	ToneFire::StudioSound test;
	test.LoadEvent("event:/Ghoul/23 hurt");
	test.LoadEvent("event:/Ghoul/22 spotted");
	test.SetEventPosition("event:/Ghoul/23 hurt", FMOD_VECTOR{ 0.0f, 0.0f, 15.0f });
	test.PlayEvent("event:/Ghoul/23 hurt");

    //Game Loop
	while (true) {
		studio.Update();
	}
	return 0;
}

Extra Info

Make sure to call Play on FMOD Core Sounds before attempting to edit the channel (eg. change position, volume), and also make sure you load all of the banks into the FMOD Studio implementation before you make any Studio Sounds. Lastly, since you will be using FMOD you need to comply to their license terms as well, one of which is to include their logo in the application you're making. Heres a link: https://www.fmod.com/download

Finally, don't have a Core and a Studio instance at the same time. FMOD Studio's underlying systems create a core system, and this could really mess with the backend.

How To add to your C++ Project

Simply add the headers required (FMOD stuff,ToneFire.h) to your include directory, and statically link ToneFire.lib. Then, copy and paste fmod.dll, fmodstudio.dll, and ToneFire.dll into your exe directory, and you'll be good to go!

tone-fire's People

Contributors

promethaes avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tone-fire's Issues

Print Error Checks

I suggest printing the error checks before exiting each function. I've made a function to handle that before so if you want I can sauce you the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.