Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio #7

Open
sharhar opened this issue Jan 10, 2017 · 13 comments
Open

Audio #7

sharhar opened this issue Jan 10, 2017 · 13 comments
Assignees

Comments

@sharhar
Copy link
Collaborator

sharhar commented Jan 10, 2017

Add Audio support.

I think I can do this if I understood the structure of the engine. If you created some template classes to put te audio code I could write the OpenAL code. What do you think?

@liavt
Copy link
Owner

liavt commented Jan 10, 2017

I like the idea. Only problem is that right now I am completely focused on getting text to work as I need it for multiple upcoming projects. I can create the template for you and link it in CMake. Do you want the audio player to be static and usable from everywhere or a class that you have to create?

@liavt
Copy link
Owner

liavt commented Jan 10, 2017

I added OpenAL as a dependency to the CMake to start working on it.

@sharhar
Copy link
Collaborator Author

sharhar commented Jan 11, 2017

Thanks for adding OpenAL to the cmake file. I'll get to adding it this weekend probably. Also, do you have a UI engine yet, because you can use my GLUI library; it works with OpenGL 3.3+ really well. Anyways, I'll contribute more soon!

@liavt
Copy link
Owner

liavt commented Jan 11, 2017

I actually have just finished the framework and I will work on implementing you GLUI library later! I wanted to add graphs and I immediately thought of your library.

@sharhar
Copy link
Collaborator Author

sharhar commented Jan 14, 2017

thanks for adding OpenAL! Could you make some template Sound and Sound Manager classes for me that integrate the engine's module architecture?

Can you please make a SoundManager class that has functions for:

  • initializing OpenAL
  • adding a Sound
  • stopping all sounds

and a Sound class that has functions for:

  • starting the sound
  • stopping the sound
  • setting if it will loop

just leave these functions back and I will figure out the OpenAL for making them work.
Also, give the sound class a constructor that takes in a path to the sound, I'll write something to read the file.

@sharhar
Copy link
Collaborator Author

sharhar commented Jan 14, 2017

should be about 2 hours of coding for me to get the job done

@liavt
Copy link
Owner

liavt commented Jan 14, 2017

Ok there is now a header file called Utility/Audio.h and a corresponding source file. I put some basic framework and I included the al.h header. Go ahead!

@liavt
Copy link
Owner

liavt commented Jan 14, 2017

Properties are managed via the BitField class which uses the bits in a byte to store boolean values. You can store 8 bools in the same space as the normal bool primitive. To add more properties, all you need to do is to add a value to the enum called Properties in Sound. Then you can use the setProperty() function to edit it. Currently, the only property there is looping, but you can add more.

@liavt
Copy link
Owner

liavt commented Jan 14, 2017

The BitField class is fully documented so you can read up on that.

@sharhar
Copy link
Collaborator Author

sharhar commented Jan 15, 2017

I just added some play and stop functionality to the Sound class. I'll work on adding volume controls and other features soon.

@sharhar
Copy link
Collaborator Author

sharhar commented Jul 23, 2017

Should I still work on other audio features, or should we close this issue?

1 similar comment
@sharhar
Copy link
Collaborator Author

sharhar commented Jul 23, 2017

Should I still work on other audio features, or should we close this issue?

@liavt
Copy link
Owner

liavt commented Jul 23, 2017

Up to you. It's very basic right now, but if you want to work on it you can. It's not really a top priority though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants