GLBasic forum

Feature request => music/sound => Topic started by: Hatonastick on 2012-Jul-08

Title: Sound buffers.
Post by: Hatonastick on 2012-Jul-08
I'd really like some sort of access to sound buffers, or be able to make and mess with them like you can screen buffers (CREATESCREEN), but more with commands a bit like some of the file ones (READBYTE, READLONG etc.).  This is pretty essential for something I want to do that is along the lines of SFXR but in real-time (writing and reading temp files wont cut it) as part of a game idea.  To be honest theres lots of reasons why being able to mess with raw WAV data could be beneficial to GLB programmers -- for the same sort of reasons programmers want to be able to create and access screen buffers to mess with the screen.

I realise it depends on the sound library you are using, and it may not be terribly high priority given more recent events (such as your very unfortunate hard drive crash), but I'm hoping it might be possible one day.
Title: Re: Sound buffers.
Post by: Ian Price on 2012-Jul-08
Sound manuipulation does appear to be one of the very few weaknesses with GLB :(
Title: Re: Sound buffers.
Post by: mentalthink on 2012-Jul-08

Adding openSL ES  Library?¿... I don´t know if it´s possible, but if it´s easiest like call OpenGL functions, can be very interesting make a port... isn´t it?¿

http://www.khronos.org/


Title: Re: Sound buffers.
Post by: Hatonastick on 2012-Jul-08
Interesting but total overkill for what I'm asking.  Still, I guess (if it could be added) it wouldn't be a bad thing for GLB.
Title: Re: Sound buffers.
Post by: bigsofty on 2012-Jul-08
I believe all the platforms use OpenAL except Windows, to avoid adding OpenAL to the windows distro. OpenAL has sound buffers, so if windows OpenAL support was added then I suppose that OpenAL buffer support could be added across all platforms.
Title: Re: Sound buffers.
Post by: Hatonastick on 2012-Jul-10
Actually what I was just thinking is I'd like to have seen the SFXR stuff added as built-in GLBasic commands -- just like the sound effect generator commands in 8-bit basic.  Thinking mostly of Locomotive BASIC of course, me being an Amstrad CPC fan and all. :)
Title: Re: Sound buffers.
Post by: Kitty Hello on 2012-Jul-14
I have plans to use libSDL and SDL-mixer on all platforms one day. Then that will be perfectly possible.
Title: Re: Sound buffers.
Post by: bigsofty on 2012-Jul-14
I have plans to use libSDL and SDL-mixer on all platforms one day. Then that will be perfectly possible.

  :happy:
Title: Re: Sound buffers.
Post by: Hatonastick on 2012-Jul-14
I have plans to use libSDL and SDL-mixer on all platforms one day. Then that will be perfectly possible.
Fantastic news mate!  No rush though, you've got plenty on your plate already.  :good: