Libraryless. Click here for Pure Java version (2885L/19K).
1 | svoid dm_playWAV(File wavFile) { |
2 | // TODO: optimize |
3 | short[] audio = decodeWAVToStereoSamples(wavFile); |
4 | |
5 | audio = convertSampleRate_stereoShortArray_simple(audio, wavSampleRate(wavFile), dm_audioOutputSampleRate()); |
6 | |
7 | // Make sound source & add to audio output module |
8 | final Var<VF1<double[]>> source = new Var; |
9 | source.set(stereoSamplesIterator_single(audio, r { dm_removeSoundSource(source!) })); |
10 | dm_addSoundSource(source!); |
11 | } |
Began life as a copy of #1018673
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1018676 |
Snippet name: | dm_playWAV |
Eternal ID of this version: | #1018676/10 |
Text MD5: | 64e8b9076775e42c11c14c22b375caab |
Transpilation MD5: | 704b055c71b5061e66964b811aadc729 |
Author: | stefan |
Category: | javax / stefan's os / audio |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-07 00:32:03 |
Source code size: | 452 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 503 / 579 |
Version history: | 9 change(s) |
Referenced in: | [show references] |