Author Topic: Access to Buffer Data ?  (Read 662 times)

Offline Marmor

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 929
  • 96A285CC
    • View Profile
    • my youtube channel
Access to Buffer Data ?
« 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

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2747
    • View Profile
Re: Access to Buffer Data ?
« Reply #1 on: 2021-Sep-06 »
This would be cool addition, allowing for sample manipulation or generating samples algorithmically(using LFO's, filters etc.).  :happy:
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5111
  • O Rly?
    • View Profile
Re: Access to Buffer Data ?
« Reply #2 on: 2021-Sep-17 »
Try to implement/use OpenAL.
I can give it a try later today, if you still need this.
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline Marmor

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 929
  • 96A285CC
    • View Profile
    • my youtube channel
Re: Access to Buffer Data ?
« Reply #3 on: 2021-Sep-21 »
thanks schranzor

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10815
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Access to Buffer Data ?
« Reply #4 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).

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5111
  • O Rly?
    • View Profile
Re: Access to Buffer Data ?
« Reply #5 on: 2021-Sep-27 »
They say, nice one :D
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2747
    • View Profile
Re: Access to Buffer Data ?
« Reply #6 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..."



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
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5111
  • O Rly?
    • View Profile
Re: Access to Buffer Data ?
« Reply #7 on: 2021-Sep-28 »
I'll try to implement "SoLoud" today.
Looks very easy to work with...
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5111
  • O Rly?
    • View Profile
Re: Access to Buffer Data ?
« Reply #8 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.
« Last Edit: 2021-Sep-30 by Schranz0r »
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10815
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Access to Buffer Data ?
« Reply #9 on: 2021-Sep-30 »
Is it? Maybe we should include it as the default sound engine, then?

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5111
  • O Rly?
    • View Profile
Re: Access to Buffer Data ?
« Reply #10 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.
« Last Edit: 2021-Sep-30 by Schranz0r »
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10815
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Access to Buffer Data ?
« Reply #11 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.

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5111
  • O Rly?
    • View Profile
Re: Access to Buffer Data ?
« Reply #12 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 :)
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard