usbDemo/src/main/java/au/id/jms/usbaudio/AudioPlayback.java
public static void write(byte[] decodedAudio) {
        // Log.d(TAG, String.format("size = %d", decodedAudio.length));
        try {
            if (track != null) track.write(decodedAudio, 0, decodedAudio.length);
            if (callback != null) callback.onData(decodedAudio);
        } catch (Exception e) {
            Log.e(TAG, "write: " + e.getMessage());
            e.printStackTrace();
        }
    }
/**
     * A callback entry for native code.
     *
     * @param decodedAudio decoded audio data
     */
A callback entry for native code.
@param decodedAudio decoded audio data
A callback entry for native code . @param decodedAudio decoded audio data
public static void write(byte[] decodedAudio) {
        try {
            if (track != null) track.write(decodedAudio, 0, decodedAudio.length);
            if (callback != null) callback.onData(decodedAudio);
        } catch (Exception e) {
            Log.e(TAG, "write: " + e.getMessage());
            e.printStackTrace();
        }
    }
public static void write ( byte [ ] decodedAudio ) { try { if ( track != null ) track . write ( decodedAudio , 0 , decodedAudio . length ) ; if ( callback != null ) callback . onData ( decodedAudio ) ; } catch ( Exception e ) { Log . e ( TAG , "write: " + e . getMessage ( ) ) ; e . printStackTrace ( ) ; } }
A callback entry for native code.
A callback entry for native code .
// Log.d(TAG, String.format("size = %d", decodedAudio.length));