Code Monkey home page Code Monkey logo

Comments (5)

segfault-bilibili avatar segfault-bilibili commented on July 20, 2024

Ah, the fact that EnsureSoundDataDecoded etc taking position as an argument itself shouldn't be a problem - the problem is, in my humble opinion, it should iterate through every block from the beginning to the current position, rather than every block from the current position to the end (of loop).

from deretore.

segfault-bilibili avatar segfault-bilibili commented on July 20, 2024

On the other hand, I think in a common streaming scenario, it should assume that the beginning part, rather than the following/ending part, is available.

from deretore.

segfault-bilibili avatar segfault-bilibili commented on July 20, 2024

Hmm... Maybe making HcaAudioStream seekable isn't as challenging as I thought. However, anyway, because of the fact that every block depends on the state decided by its prior block to be correctly decoded, the beginning part still has to be (in the first place: available - and then) decoded in order, only after that could the decoder then hand out decoded WAV PCM data.

from deretore.

segfault-bilibili avatar segfault-bilibili commented on July 20, 2024

Hmm... As for:

in a common streaming scenario, it should assume that the beginning part, rather than the following/ending part, is available

I think even if, like, the user drags the timeline/progress bar to skip some part in the beginning, (strictly saying) the decode still has no choice but to download & decode all prior blocks in spite of the fact that those block will probably never be used/played.

(However, according to my rough observation, the "effect" won't last for more than 1 block, so maybe fetching & decoding 2 prior blocks (rather than the whole part up to the beginning) is already enough)

from deretore.

segfault-bilibili avatar segfault-bilibili commented on July 20, 2024

Ah, after skimming VGAudio's related code (related: Nyagamon/HCADecoder#4 ), I think maybe (still not very sure) this "state/context" dependence problem shouldn't be as important as I originally thought.

from deretore.

Related Issues (20)

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.