From 95ab4d90ad6ee7644fd9a0b0d70a59e6c6b2dbda Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 30 Jul 2012 22:05:11 +0200 Subject: AudioIn/Out classes based on Alsa. --- src/crosscomposer.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/crosscomposer.cc') diff --git a/src/crosscomposer.cc b/src/crosscomposer.cc index 049d57f..c8992ff 100644 --- a/src/crosscomposer.cc +++ b/src/crosscomposer.cc @@ -25,8 +25,24 @@ * along with Cross Composer; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include +#include "audioin.h" +#include "audioout.h" -int main() +int main(int argc, char *argv[]) { + AudioIn in("default", "Capture", 44101, 1); + AudioOut out("default", 44101, 1); + + sample_t samples[940]; + int i = 50; + while(i--) { + int sz = in.read(samples, sizeof(samples)); + out.write(samples, sz); + printf("."); fflush(stdout); + } + printf("!\n"); + + return 0; } -- cgit v1.2.3