harrisi
harrisi
SMSoftware Mansion
Created by harrisi on 8/8/2024 in #membrane-help
Background loop with sound effect playback on event
that makes sense. thanks a lot for the suggestion!
13 replies
SMSoftware Mansion
Created by harrisi on 8/8/2024 in #membrane-help
Background loop with sound effect playback on event
if I understand correctly, the Mixer would have dynamic pads which would mix (somehow) the looping buffer when linked. I haven't used dynamic pads (I just started with membrane yesterday), but that flow does make sense to me. there's some hand waving, but I think I kinda get it.
13 replies
SMSoftware Mansion
Created by harrisi on 8/8/2024 in #membrane-help
Background loop with sound effect playback on event
ohh, so you have something like this?:
child(%LoopingBufferQueue{source: "wherever"}) # this just loops forever
|> child(%Mixer{}) # this has a static pad which consumes the looping buffer, and has dynamic pads which would be linked for sound effects
|> child(%Sink{}) # output, in my case portaudio
child(%LoopingBufferQueue{source: "wherever"}) # this just loops forever
|> child(%Mixer{}) # this has a static pad which consumes the looping buffer, and has dynamic pads which would be linked for sound effects
|> child(%Sink{}) # output, in my case portaudio
13 replies
SMSoftware Mansion
Created by harrisi on 8/8/2024 in #membrane-help
Background loop with sound effect playback on event
Is this actually needed? If I have two different pipelines to play the audio, it seems to play things correctly. It does seem like mixing the audio could improve things, but I'm not sure how to do that with the background loop. Maybe dynamic pads or something?
13 replies
SMSoftware Mansion
Created by harrisi on 8/8/2024 in #membrane-help
Background loop with sound effect playback on event
That's true, I do have some various warnings about that. Good tip!
13 replies
SMSoftware Mansion
Created by harrisi on 8/8/2024 in #membrane-help
Background loop with sound effect playback on event
if anyone wants to see the code, https://github.com/harrisi/elixir_breakout/pull/1/files is just membrane stuff, shouldn't need to look at the rest of the project to understand.
13 replies
SMSoftware Mansion
Created by harrisi on 8/8/2024 in #membrane-help
Background loop with sound effect playback on event
I'd still like some help with this if anyone has any suggestions, but what I'm doing for now is I have my looping background as it's own pipeline, and another sound effect pipeline that takes a path. in places where I want to play a sound effect, I just call Membrane.Pipeline.start/3. the background pipeline is in my application's supervision tree but the sound effect pipeline isn't.
13 replies
SMSoftware Mansion
Created by harrisi on 8/8/2024 in #membrane-help
Background loop with sound effect playback on event
I guess I'm also confused on how to keep the background loop playing when the sound effects play. I suppose multiple sound effects could play overlapped as well.
13 replies