love.audiodisconnected

Available since LÖVE 12.0
This callback is not supported in earlier versions.

Called when the active audio device is disconnected (e.g. physically unplugging headphones).

All audio are stopped and loses their playback position when this callback is called.

Function

Synopsis

reconnected = love.audiodisconnected( sources )

Arguments

table sources
List of sources that was playing.

Returns

boolean reconnected
Is audio re-connection attempt has been done?

Notes

If love.audio.setPlaybackDevice is called inside the callback, true must be returned to prevent LÖVE from re-connecting the audio device again.

See Also


Other Languages