Git Product home page Git Product logo

audio's People

Contributors

dudk avatar keeofkoo avatar

Stargazers

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

Watchers

 avatar  avatar

audio's Issues

Audio structs relations

Package audio provides some high-level primitives for asset/track manipulations. Relations between entities should be defined with next hierarchy:

  • Asset contains signal
  • Asset can be split into Clips
  • Clip contains same signal as it's parent Asset + start and length of the Clip
  • Asset refers to all Clips
  • Track consists of links
  • link refers to Clip

Repeater's message buffers not being recycled

It seems like the repeater's message buffer will never be recycled by the pool allocator (correct me if I'm wrong).

The buffers are "allocated" and wrapped in a message struct per source in:

audio/repeat.go

Lines 40 to 46 in 8454b94

for _, source := range r.sources {
out := p.GetFloat64()
signal.FloatingAsFloating(in, out)
source <- message{
sources: int32(len(r.sources)),
buffer: out,
}

and they are not getting recycled after being used in:

audio/repeat.go

Lines 77 to 84 in 8454b94

message, ok = <-source
if !ok {
return 0, io.EOF
}
read := signal.FloatingAsFloating(message.buffer, b)
if atomic.AddInt32(&message.sources, -1) == 0 {
message.buffer.Free(p)
}

Asset and track copy data multiple times

From what I can see the floating point data is copied to multiple structs. This causes even a simple pipeline to consume much more memory than it should. For example creating pipeline made up with a mixer, 8 lines each with 100 assets. This takes 4GB+ of memory. Each sample is <400kb which should in theory mean less than 500mb should be used.

Happy to help on this as we're looking to use this library in one of our projects.

Mixer doesn’t stop when context is expired

When context is expired the order of flushing isn't determined. It means that sinks can stuck because source was cancelled earlier. To avoid that the context should be propagated into both source and sink.

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.