-- Load and play a sound effect
local sound = love.audio.newSource("explosion.wav", "static")
love.audio.play(sound)
Background music with volume control
-- Load background music and set volume
local music = love.audio.newSource("background.mp3", "stream")
music:setVolume(0.5)
music:setLooping(true)
love.audio.play(music)
Best practices
Use "static" sources for short sound effects and "stream" sources for long music tracks
Preload audio files during loading screens to avoid delays
Consider using audio effects (reverb, echo) sparingly for performance
Test audio on target platforms as format support may vary
Use appropriate audio formats: OGG/Vorbis for music, WAV for sound effects
Platform compatibility
Desktop (Windows, macOS, Linux): Full audio support including 3D audio and effects
Mobile (iOS, Android): Full support but some effects may be limited
Web: Limited to basic audio playback, no recording or advanced effects
Performance considerations
Too many simultaneous audio sources can cause performance issues
Complex audio effects impact CPU usage
Streaming audio uses less memory than static audio
Audio position calculations for 3D audio can be CPU-intensive
1---2name: love-audio-23description: When to use this skill4---56## When to use this skill7{{SKILL_DESCRIPTION}} Use this skill when working with sound effects, music playback, audio recording, or any audio-related operations in LÖVE games.89## Common use cases10- Playing background music and sound effects11- Implementing dynamic audio for game events12- Recording and processing audio input13- Creating immersive 3D audio experiences14- Managing multiple audio sources simultaneously1516{{MODULES_LIST}}17{{FUNCTIONS_LIST}}18{{CALLBACKS_LIST}}19{{TYPES_LIST}}20{{ENUMS_LIST}}2122## Examples2324### Playing a sound effect25```lua26-- Load and play a sound effect27local sound = love.audio.newSource("explosion.wav", "static")28love.audio.play(sound)29```3031### Background music with volume control32```lua33-- Load background music and set volume34local music = love.audio.newSource("background.mp3", "stream")35music:setVolume(0.5)36music:setLooping(true)37love.audio.play(music)38```3940## Best practices41- Use "static" sources for short sound effects and "stream" sources for long music tracks42- Preload audio files during loading screens to avoid delays43- Consider using audio effects (reverb, echo) sparingly for performance44- Test audio on target platforms as format support may vary45- Use appropriate audio formats: OGG/Vorbis for music, WAV for sound effects4647## Platform compatibility48- **Desktop (Windows, macOS, Linux)**: Full audio support including 3D audio and effects49- **Mobile (iOS, Android)**: Full support but some effects may be limited50- **Web**: Limited to basic audio playback, no recording or advanced effects5152## Performance considerations53- Too many simultaneous audio sources can cause performance issues54- Complex audio effects impact CPU usage55- Streaming audio uses less memory than static audio56- Audio position calculations for 3D audio can be CPU-intensive
Run npx skillmds@latest add redkenrok/love-audio-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
When to use this skill It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
RedKenrok (@redkenrok) published this skill. Their other Agent Skills are listed on their SkillMD profile.