audio - Java Sound. Temporarily mute background music and play a sound -
i'm in fraternity in college , in fraternity have stairs. every , 1 time again falls downwards stairs. play music computer behind bar (usually net or itunes). have usb button, , write programme temporarily mutes background music , plays clip song "wiiiipe-ouuut" when press button after falls downwards stairs. how sound... have ideas?
it pretty easy create java app exposes little more button plays given sound cue, or set of buttons different cues.
you presumably leave application running, waiting right time press button, in order near-instantaneous response. i'd utilize swing library create button , javax.sound.sampled.clip hold sound in memory , play on command. however, there maybe easier sound objects this, since don't need play cue @ total volume. also, javafx starting used gui buttons.
i don't know how turn downwards itunes or browser volume java. not can't done. if else can how, select answer! haven't tried yet.
but, maybe not hard manually turn , downwards volume of itunes or browser if practice few times. turning volume or downwards has benefit of not beingness disruptive stopping , restarting music application. so, turn downwards volume in app (not main computer volume!), mouse on java button app , click it, wait sound end , turn volume of music app up. not ideal, job of producing desired sounds.
another idea, maybe instead of controlling music apps, there way route output of apps through java before playing them. in case, single button force written handle entire sequence. i'd targetdataline main tool used handle inputting of sound stream, don't know how you'd id appropriate mixer lines or ports. it's has customized setup , os , sound card or sound system.
fun idea! language might work this, e.g., separate little browser window html5 , button launching sound effect.
java audio usb javasound
No comments:
Post a Comment