Mercurial > hg > may
changeset 0:90ddb49d94c5
Getting started
author | Chris Cannam |
---|---|
date | Thu, 22 Nov 2012 21:43:25 +0000 |
parents | |
children | 7aedeab67b08 |
files | Makefile audio.yeti yc |
diffstat | 3 files changed, 35 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile Thu Nov 22 21:43:25 2012 +0000 @@ -0,0 +1,14 @@ + +YETI_JARPATH := /usr/local/lib/yeti +YETI_JARS := asm-3.1r yeti yeti-lib + +CLASSPATH := $(patsubst %,$(YETI_JARPATH)/%.jar,$(YETI_JARS)) +CLASSPATH := $(shell echo $(CLASSPATH) | tr ' ' ':') + +SOURCES := \ + audio.yeti + + + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio.yeti Thu Nov 22 21:43:25 2012 +0000 @@ -0,0 +1,18 @@ + +module audio; + +import javax.sound.sampled: + AudioSystem, AudioInputStream, AudioFormat, UnsupportedAudioFileException; + +import java.io: File, IOException; + +openAudioFile name is string -> 'a = + (f = new File(name); + stream = AudioSystem#getAudioInputStream(f); + format = stream#getFormat(); + { stream, format } ); + +{ + openAudioFile +} +