handmade.network » Forums » Work-in-Progress » (beebop) - Initial audio and ui working
miked
Michael Dodis
12 posts / 1 project
#20590 (beebop) - Initial audio and ui working
5 months, 3 weeks ago Edited by Michael Dodis on Feb. 25, 2019, 7:40 a.m.

Hello again! I took some time to start working on the audio part of the program, as well as using the existing UI code to manipulate stuff.
Here's the link to the build.


Running it will open a file dialog, to let you select a music file (I have confirmed that MP3 files work so please try not to select anything else :) ).

On the left the 2 sliders are used to change the position of the song (green-ish slider), and the volume (blue slider). The blank space on the right is actually a button, and pressing it should pause/continue playing. The sliders have (slightly) different behavior: the position slider will only affect the song's position when the left mouse button is let go. The volume slider will change when the slider is moved.

The program is still pretty buggy, but if anything starts to really not work, please tell me! But in general, any observations and criticism are all welcome!

Next up, I'll be working on making the layout a bit more flexible, and adding some more features to the audio component (changing the song at run-time etc...).

Thank you for reading!
mrmixer
Simon Anciaux
656 posts
#20591 (beebop) - Initial audio and ui working
5 months, 3 weeks ago

It's not working for me.

When I choose a file, the ui shows up but no sound is playing, the green slider doesn't move, play/pause doesn't do anything. On Windows 7 64bit.
miked
Michael Dodis
12 posts / 1 project
#20593 (beebop) - Initial audio and ui working
5 months, 3 weeks ago

Does the song file, by any chance contain non-ASCII characters? I know that for now, the program can't handle unicode. I'll test it on other files later on.
Thanks for trying it out anyway!
miked
Michael Dodis
12 posts / 1 project
#20594 (beebop) - Initial audio and ui working
5 months, 3 weeks ago

All right, does this work for you? I tested it on a Windows 7 VM, but I can't be sure.
Here's the updated build

I don't think this will fix it completely, but I was forgetting to initialize a struct properly. After fixing that, it worked on the VM ok.
mrmixer
Simon Anciaux
656 posts
#20596 (beebop) - Initial audio and ui working
5 months, 3 weeks ago

The new build is working.
miked
Michael Dodis
12 posts / 1 project
#20597 (beebop) - Initial audio and ui working
5 months, 3 weeks ago

Great! Thank you very much! I'll update the build file I'm linking to in the initial post!