Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1009772 // audioOutputStreamAsOutputStream

JavaX fragment (include)

lib 1009770 // tritonus share
lib 1009766 // tritonus AudioOutputStream

import org.tritonus.share.sampled.file.*;
import org.tritonus.sampled.file.*;

static OutputStream audioOutputStreamAsOutputStream(final AudioOutputStream audioOut) {
  ret new OutputStream {
    public void write(int b) throws IOException {
      audioOut.write(new byte[] { (byte) b }, 0, 1);
    }
    
    public void write(byte[] b) throws IOException {
      audioOut.write(b, 0, l(b));
    }
    
    public void write(byte[] b, int o, int l) throws IOException {
      audioOut.write(b, o, l);
    }
  };
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009772
Snippet name: audioOutputStreamAsOutputStream
Eternal ID of this version: #1009772/1
Text MD5: 3b1af4e928292effcacad8081f14df62
Author: stefan
Category: javax / audio
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-16 17:12:22
Source code size: 607 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 481 / 524
Referenced in: [show references]