Giter Club home page Giter Club logo

androidoggstreamplayer's People

Contributors

radzio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

androidoggstreamplayer's Issues

Bug: Invalid buffer size: minFrameCount 2400, frameCount 512

04-06 18:33:42.043: ERROR/AudioTrack(24963): Invalid buffer size: minFrameCount 2400, frameCount 512
04-06 18:33:42.043: ERROR/AudioTrack-JNI(24963): Error initializing AudioTrack
04-06 18:33:42.043: ERROR/AudioTrack-Java(24963): [ android.media.AudioTrack ] Error code -20 when initializing AudioTrack.
04-06 18:33:42.043: ERROR/OggStreamPlayer(24963): playAsync():
java.lang.IllegalStateException: play() called on uninitialized AudioTrack.
at android.media.AudioTrack.play(AudioTrack.java:824)
at net.droidlabs.audio.ogg.OggStreamPlayer.initializeSound(OggStreamPlayer.java:571)
at net.droidlabs.audio.ogg.OggStreamPlayer.playImpl(OggStreamPlayer.java:246)
at net.droidlabs.audio.ogg.OggStreamPlayer.play(OggStreamPlayer.java:133)
at net.droidlabs.audio.ogg.OggStreamPlayer$1.run(OggStreamPlayer.java:149)
at java.lang.Thread.run(Thread.java:1027)

Issue streaming short audio files

The player is great and I'm using it in my new project to send push to talk messages. If the audio file is greater than a certain length, everything works great (see 31.ogg), however, if the audio file is very short (see 36.ogg) then the decodeCurrentPacket() method is never called. In fact, by the time it reaches readBody() and calls count = inputStream.read(buffer, index, bufferSize), count is -1. While reading the header information the rest of the data is consumed so nothing is left to be consumed in the body when readBody() is entered.

On a side note, when the count is -1 (the end of the stream), it should be properly handled and changed into a 0 to pass to joggSyncState.wrote(count);

https://dl.dropbox.com/u/99827173/31.ogg (11.1Kb ~3sec)
https://dl.dropbox.com/u/99827173/36.ogg (6.9Kb ~1sec)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.