GLBasic forum

Main forum => GLBasic - en => Topic started by: Marmor on 2021-Sep-06

Title: Access to Buffer Data ?
Post by: Marmor on 2021-Sep-06
LOADSOUND "WAVE.WAV",1,1

PLAYSOUND (1, -1, 1)

i load a wav and want to have access to the Buffer or if not possible a way to save the wav ala savesprite.
thx
Title: Re: Access to Buffer Data ?
Post by: bigsofty on 2021-Sep-06
This would be cool addition, allowing for sample manipulation or generating samples algorithmically(using LFO's, filters etc.).  :happy:
Title: Re: Access to Buffer Data ?
Post by: Schranz0r on 2021-Sep-17
Try to implement/use OpenAL.
I can give it a try later today, if you still need this.
Title: Re: Access to Buffer Data ?
Post by: Marmor on 2021-Sep-21
thanks schranzor
Title: Re: Access to Buffer Data ?
Post by: Kitty Hello on 2021-Sep-27
I think we'd better go with "SOLOUD". That's a x-platform sound engine that does not suck (they say).
Title: Re: Access to Buffer Data ?
Post by: Schranz0r on 2021-Sep-27
They say, nice one :D
Title: Re: Access to Buffer Data ?
Post by: bigsofty on 2021-Sep-28
I think we'd better go with "SOLOUD". That's a x-platform sound engine that does not suck (they say).

"SOLOUD..."
(https://c.tenor.com/CY175DM3eucAAAAC/simpsons-dreamy.gif)


Quote
Multiple voices, playing different or even the same sound multiple times on top of each other.
Adjustable play speed, volume and pan.
Faders for all of the attributes (fade out for 2 seconds, then stop, for instance).
Filter interface and ready filters for low/high pass, echo, etc for real-time modification of audio.
Mixing busses for grouping of audio into different uses and adjusting their attributes in one go.
Gapless looping.
Queued sounds.
Playing several ogg streams at once.
Atomic operations for several sounds.
"Clocked" playing for rapid sound effects.
Sound effects synthesizer.
Speech synthesizer.
Support for various common formats like 8, 16, 32 bit wavs, floating point wavs, ogg, mp3.
Up to 8 surround speaker support, easily extendable.
3d positional audio.
Foreign interface support for python, ruby (and RPG maker), blitzmax, c# and more.
Exotic formats like MONOTONE, SID and TED songs.
Works with Emscripten.
Virtual voices.
Easy cleanup
Title: Re: Access to Buffer Data ?
Post by: Schranz0r on 2021-Sep-28
I'll try to implement "SoLoud" today.
Looks very easy to work with...
Title: Re: Access to Buffer Data ?
Post by: Schranz0r on 2021-Sep-29
Ok, SoLoud is easy to wrapp into GLbasic.
You need the Headers (#include "soloud_c.h") + src-folder an the DLL.
Simple C syntax, i'm done with the start.   

Upload the project later today.
Title: Re: Access to Buffer Data ?
Post by: Kitty Hello on 2021-Sep-30
Is it? Maybe we should include it as the default sound engine, then?
Title: Re: Access to Buffer Data ?
Post by: Schranz0r on 2021-Sep-30
There is a way to link it static.
No clue how, maybe we can just use the source?
Sure, why not use it as default :)

SoLoud C-API:

Quote
Using the "C" API
The glue file soloud_c.cpp can be found under the "src/c_api" directory.

You can either link to the generated DLL, which exposes the "C" API, or you can include SoLoud C++ sources (or static library) to your project along with the soloud_c.cpp file.

In your C sources, include soloud_c.h header file.
Title: Re: Access to Buffer Data ?
Post by: Kitty Hello on 2021-Sep-30
I ordered a Strato HiDrive account and will set up a Git repository. So we can use Git to act together. But, I failed to clone it. Maybe my work-configuration messes with the private account... I'll have to see.
Title: Re: Access to Buffer Data ?
Post by: Schranz0r on 2021-Sep-30
I ordered a Strato HiDrive account and will set up a Git repository. So we can use Git to act together. But, I failed to clone it. Maybe my work-configuration messes with the private account... I'll have to see.

Oh nice, hopefully you get it running.
Let us know :)