Announcement

Collapse
No announcement yet.

Play audio component on press / Stop audio component on release - Basics

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Play audio component on press / Stop audio component on release - Basics

    Hello everyone!
    Well I just want to set up a basic Audio management system for my project.
    I got two audio components in my blueprint controller, one of them should play as long as I hold my left mouse button and stop playing when I release it. Keyboard 1 and 2 should just switch between both audio components.
    I deactivated on both audio components autoplay, and attached to them a matching sound cue which is able to loop. I know that the Tick Event isn't quite good for the performance of my computer but for this debug it should be okay. That's all I've done...

    Sounds really simple, but I just can't figure out what I'm doing wrong.

    Attached is an Image of the blueprint.

    Click image for larger version

Name:	Audio.jpg
Views:	12
Size:	192.1 KB
ID:	1652796Thanks for helping me.

    Cheers.

    #2
    The Event Tick executes every single frame.

    That means when you press your Left Mouse Button down, you are telling the Audio Components to start Playing the audio from time 0 every single frame, like 30+ times per second. It's likely you can't even get a few milliseconds into your audio file before starting over.

    Dan Reynolds
    Technical Sound Designer || Unreal Audio Engine Dev Team

    Comment

    Working...
    X