Need simple sound

FoxyBrown via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 6 10:33:49 PDT 2017


On Thursday, 6 July 2017 at 14:41:32 UTC, Sebastiaan Koppe wrote:
> On Thursday, 6 July 2017 at 13:28:26 UTC, FoxyBrown wrote:
>> On Wednesday, 5 July 2017 at 07:21:45 UTC, Sebastiaan Koppe 
>> wrote:
>>> Sure, see http://code.dlang.org/packages/portaudio
>>
>> So, after a bit of work I can get port audio to work but the 
>> callback never seems to be called(no audio, never hits bp). 
>> Shows all the devices and seems to run fine otherwise. Tried 
>> all the devices I I have. The default stream doesn't work 
>> either.
>
> The example I posted earlier did work on my Mac.
>
> I will try your example + dll loader on Windows later today. 
> Nice loader btw.

The example was drawn pretty much off the portaudio binding you 
linked. I just fixed it up so that the device parameters were 
automatically detected for the device I specified(as I got tired 
of manually typing them and getting errors).

The autodll fixed the problem of trying to get the libs to work, 
which none did and just didn't seem worth the trouble getting to 
work. whats the real difference between that and the dll with the 
autoload code? We can bind the dll to the exe at compile time 
then use import to import it and load it from memory, so it, in 
effect, is self contained like a lib.

I think the autoDLL if done right. I hacked it together and 
worked easier than I thought but didn't put in the time to make 
it nice. It could avoid libs all together, not that we need to do 
that. Still need a h/di file, of course.

But why port audio is not calling the callback is beyond me.



More information about the Digitalmars-d-learn mailing list