Author Topic: Sound buffers.  (Read 3994 times)

Offline Hatonastick

  • Dr. Type
  • ****
  • Posts: 474
  • Amstrad CPC 6128
    • View Profile
Sound buffers.
« 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.
« Last Edit: 2012-Jul-08 by Hatonastick »
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4097
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Sound buffers.
« Reply #1 on: 2012-Jul-08 »
Sound manuipulation does appear to be one of the very few weaknesses with GLB :(
I came. I saw. I played.

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3321
  • Integrated Brain
    • View Profile
Re: Sound buffers.
« Reply #2 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/



Offline Hatonastick

  • Dr. Type
  • ****
  • Posts: 474
  • Amstrad CPC 6128
    • View Profile
Re: Sound buffers.
« Reply #3 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.
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2459
    • View Profile
Re: Sound buffers.
« Reply #4 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.
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 Hatonastick

  • Dr. Type
  • ****
  • Posts: 474
  • Amstrad CPC 6128
    • View Profile
Re: Sound buffers.
« Reply #5 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. :)
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10651
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Sound buffers.
« Reply #6 on: 2012-Jul-14 »
I have plans to use libSDL and SDL-mixer on all platforms one day. Then that will be perfectly possible.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2459
    • View Profile
Re: Sound buffers.
« Reply #7 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:
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 Hatonastick

  • Dr. Type
  • ****
  • Posts: 474
  • Amstrad CPC 6128
    • View Profile
Re: Sound buffers.
« Reply #8 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:
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).