Mercurial > hg > jslab
changeset 3:15b93db27c04
Get StreamSource to compile, update args for demo
author | samer |
---|---|
date | Fri, 05 Apr 2019 17:00:18 +0100 |
parents | 74cc9e431818 |
children | 79922c7f2475 |
files | examples/misc/args src/samer/audio/StreamSource.java |
diffstat | 2 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/misc/args Fri Apr 05 16:43:56 2019 +0100 +++ b/examples/misc/args Fri Apr 05 17:00:18 2019 +0100 @@ -1,15 +1,15 @@ #properties -#Tue Mar 26 17:20:08 GMT 2019 +#Fri Apr 05 16:58:54 BST 2019 mouse.y.trace.map.minimum=-0.0 ft.power.plotter.window.bounds=(323,142,512,118) mouse.x.trace.map.symmetric=false x.editor.plotter.window.bounds=(490,234,231,110) scaler.scale.meter.map.maximum=6370.513 -exposed.bounds=(48,23,286,653) +exposed.bounds=(48,23,286,705) mouse.exposed.bounds=(448,59,223,119) ft.power.trace.map.minimum=0.001 mouse.y.trace.map.maximum=400.0 -waveform.plotter.window.bounds=(4,22,1020,118) +waveform.plotter.window.bounds=(336,23,513,108) mouse.y.trace.window.bounds=(694,148,264,86) waveform.scaler.laplace.e.plotter.window.bounds=(4,22,1024,118) playlist.files='("/Users/samer/Music/Artists/Tunng/comments on the inner chorus/01-Hanged.mp3" "/Users/samer/Music/Artists/Tunng/comments on the inner chorus/02-Woodcat.mp3" "/Users/samer/Music/Artists/Tunng/comments on the inner chorus/03-The Wind Up Bird.mp3" "/Users/samer/Music/Artists/Tunng/comments on the inner chorus/04-Red And Green.mp3" "/Users/samer/Music/Artists/Tunng/comments on the inner chorus/05-Stories.mp3" "/Users/samer/Music/Artists/Tunng/comments on the inner chorus/06-Jenny Again.mp3" "/Users/samer/Music/Artists/Tunng/comments on the inner chorus/07-Man In The Box.mp3" "/Users/samer/Music/Artists/Tunng/comments on the inner chorus/08-Jay Down.mp3" "/Users/samer/Music/Artists/Tunng/comments on the inner chorus/09-It's just because we've got hair.mp3" "/Users/samer/Music/Artists/Tunng/comments on the inner chorus/10-Sweet William.mp3" "/Users/samer/Music/Artists/Tunng/comments on the inner chorus/11-Engine Room.mp3") @@ -17,7 +17,7 @@ trace.bounds=(493,106,264,86) scaler.E=2895.934 ft.power.trace.map.maximum=60.0 -ft.power.trace.window.bounds=(405,22,256,534) +ft.power.trace.window.bounds=(334,130,515,534) mouse.x.trace.map.minimum=0.0 waveform.scaler.scale=0.023 scaler.output.plotter.window.bounds=(12,589,1020,118) @@ -25,7 +25,7 @@ mouse.y.trace.map.symmetric=false playlist.current=/Users/samer/Music/Onset_paper/UPFsamples/audio/RadioTarifa3.wav mouse.x.trace.window.bounds=(693,61,264,86) -ft.power.image.window.bounds=(4,22,513,37) +ft.power.image.window.bounds=(335,666,513,64) x1.plotter.window.bounds=(440,22,231,118) x1.editor.plotter.window.bounds=(419,160,289,121) ft.mag.plotter.window.bounds=(502,338,256,118)
--- a/src/samer/audio/StreamSource.java Fri Apr 05 16:43:56 2019 +0100 +++ b/src/samer/audio/StreamSource.java Fri Apr 05 17:00:18 2019 +0100 @@ -119,6 +119,9 @@ /** Returns number of bytes available in current file */ public int available() throws Exception { return in.available(); } + public float getRate() { return source.getFormat().getFrameRate(); } + public int getChannels() { return source.getFormat().getChannels(); } + private void setChunkSize(int s) { chunk=s; } private void setByteBuffer() { byte_buf = new byte[2*chunk*(channelsToMix>0 ? channelsToMix : 1)];