www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Audio Library or Wrapper for use with GtkD?

reply Ron Tarrant <rontarrant gmail.com> writes:
Hi all,

After some initial research, I'm left wondering if there's a 
suitable audio library that could be (or is being) used by 
cross-platform GtkD applications. I've found a few mentions of 
people doing audio programming in D, but so far, no real 
meat-n-taters examples or API.

I did find a mention of 'mp3' and a couple others for 'audio' and 
'sound' in the GtkD wrapper code, but nothing concrete.

Mainly what I'm hoping to find is something that will allow audio 
playback that can be triggered from a callback, but if it also 
dips into manipulation of sound samples, start, stop, pause, 
rewind, etc. that would be a nice addition.
Jul 28 2019
next sibling parent reply Guillaume Piolat <first.last gmail.com> writes:
On Sunday, 28 July 2019 at 09:41:29 UTC, Ron Tarrant wrote:
 Hi all,

 After some initial research, I'm left wondering if there's a 
 suitable audio library that could be (or is being) used by 
 cross-platform GtkD applications. I've found a few mentions of 
 people doing audio programming in D, but so far, no real 
 meat-n-taters examples or API.

 I did find a mention of 'mp3' and a couple others for 'audio' 
 and 'sound' in the GtkD wrapper code, but nothing concrete.

 Mainly what I'm hoping to find is something that will allow 
 audio playback that can be triggered from a callback, but if it 
 also dips into manipulation of sound samples, start, stop, 
 pause, rewind, etc. that would be a nice addition.
BindBC has SDL_mixer bindings which is probably the best D solution for playback ATM. https://github.com/BindBC/bindbc-sdl/blob/master/source/bindbc/sdl/mixer.d It supports playback of samples and music, suitable for video games. With recent SDL_mixer developments, you can hook a 32-bit float callback on the playback and channels alike, which allos for all kind of niceties.
Jul 28 2019
parent Ron Tarrant <rontarrant gmail.com> writes:
On Sunday, 28 July 2019 at 10:27:21 UTC, Guillaume Piolat wrote:

 BindBC has SDL_mixer bindings which is probably the best D 
 solution for playback ATM. 
 https://github.com/BindBC/bindbc-sdl/blob/master/source/bindbc/sdl/mixer.d

 It supports playback of samples and music, suitable for video 
 games.

 With recent SDL_mixer developments, you can hook a 32-bit float 
 callback on the playback and channels alike, which allos for 
 all kind of niceties.
Thanks, Guillaume. I'll give it a try.
Jul 28 2019
prev sibling next sibling parent Mike Wey <mike-wey example.com> writes:
On 28-07-2019 11:41, Ron Tarrant wrote:
 Hi all,
 
 After some initial research, I'm left wondering if there's a suitable 
 audio library that could be (or is being) used by cross-platform GtkD 
 applications. I've found a few mentions of people doing audio 
 programming in D, but so far, no real meat-n-taters examples or API.
 
 I did find a mention of 'mp3' and a couple others for 'audio' and 
 'sound' in the GtkD wrapper code, but nothing concrete.
 
 Mainly what I'm hoping to find is something that will allow audio 
 playback that can be triggered from a callback, but if it also dips into 
 manipulation of sound samples, start, stop, pause, rewind, etc. that 
 would be a nice addition.
 
GtkD includes a binding for Gstreamer (https://gstreamer.freedesktop.org/) a small example of playing audio can be found here: https://github.com/gtkd-developers/GtkD/blob/master/demos/gstreamer/helloworld/gstreamer_helloworld.d -- Mike Wey
Jul 28 2019
prev sibling parent JN <666total wp.pl> writes:
On Sunday, 28 July 2019 at 09:41:29 UTC, Ron Tarrant wrote:
 Hi all,

 After some initial research, I'm left wondering if there's a 
 suitable audio library that could be (or is being) used by 
 cross-platform GtkD applications. I've found a few mentions of 
 people doing audio programming in D, but so far, no real 
 meat-n-taters examples or API.

 I did find a mention of 'mp3' and a couple others for 'audio' 
 and 'sound' in the GtkD wrapper code, but nothing concrete.

 Mainly what I'm hoping to find is something that will allow 
 audio playback that can be triggered from a callback, but if it 
 also dips into manipulation of sound samples, start, stop, 
 pause, rewind, etc. that would be a nice addition.
https://code.dlang.org/packages/bindbc-soloud might do the trick
Jul 28 2019