JUCE WAV output to ASIO

w00t! Got WAV output from disk to ASIO! Well it worked on my system anyway. … Get the hot new filez here! (SampleEditor-005-bit.zip)

Uses AudioStreamPlayer, WavAudioFormat, AudioFormatReader, FileInputStream, and ASIOAudioIODevice.

Beware it’s hacky–blocks (polls) during playback.

Make sure test.wav is in the same folder.

44.1KHz only.

Move polling into a worker thread.
Inherit from Component, implement proper message handler.
Use AudioSubsectionReader to play clips with better control?

man, ya’ll are making learning c++ hella fun… hehe. It crashed on me, but that was resolved by using the full pathname to the test.wav file. Bumped up the Asiodevicename one, and surely it played back on my 2nd asio device too!

Schweeetttnesss! :smiley:

I think it throws an assert in a debug build, if you don’t open the file with the full path prepended. In a release build this shouldn’t happen. I think.

:idea: Need some sort of generic tape transport and time/sample counter in a window. [list]
*broadcast predefined transport messages to all who are listening for them (e.g. WavePlay et al).
*short skinny one-line toolbar button, perhaps 2x the H of the title bar
*located in the base section, perhaps floating/dockable for users who insist on clicking instead of using the keyboard.
*small enough that it doesn’t need to be resizeable.
*message handler would support external control of the transport itself, to allow automation.
*Scrub wheel.
*pre/post/loop points
*what else?
Mr. SigmaDelta, as the project lead/architect, are you in line with this concept?

MMMM I can use this hehe.

I just got it working last night too, but this is more useful.

I wonder where valley is, he’s supposed to be the leader of the project :wink:

wow, I thought you were bcz you seemed so on top of it…valley’s prolly just busy like everybody else. Maybe he has a life <gasp!>

surprising to know, I work 12 hours a day…

maybe it’d be 6-8 if I wasnt twiddling with other things all day :slight_smile:

Oh well, programming more today…

hey bithead, you dont mind if I rip out your code and just draw a wav to screen rather than play it?

I think we should try to get basic editing down, then playback the edited data.

So Ill just make a container for the drawing (resizeable within the main window) etc…

Please don’t ! It would be much better practice to just create a new class and copy whatever you need. A WavePlayer is a WavePlayer. Not a WaveDrawer.

I wonder where valley is[/quote]

Valley is trying to make head or tails of the messed up three way switch wiring the previous occupants of his house installed.

He’ll be back just as soon as he is done blowing fuses, and drywalling over sections of his wall removed so that he can install an actual earth line.

Valley thinks the people he bought his house from were total fuckwits.