Browse Source

Moved the love.audio.stop call when love is quit from love.run to the destructor of the Audio module.

Alex Szpakowski 10 years ago
parent
commit
6d3ae981ac
3 changed files with 2 additions and 8 deletions
  1. 2 0
      src/modules/audio/openal/Audio.cpp
  2. 0 3
      src/scripts/boot.lua
  3. 0 5
      src/scripts/boot.lua.h

+ 2 - 0
src/modules/audio/openal/Audio.cpp

@@ -131,6 +131,8 @@ Audio::Audio()
 
 
 Audio::~Audio()
 Audio::~Audio()
 {
 {
+	stop();
+
 	poolThread->setFinish();
 	poolThread->setFinish();
 	poolThread->wait();
 	poolThread->wait();
 
 

+ 0 - 3
src/scripts/boot.lua

@@ -496,9 +496,6 @@ function love.run()
 			for e,a,b,c,d in love.event.poll() do
 			for e,a,b,c,d in love.event.poll() do
 				if e == "quit" then
 				if e == "quit" then
 					if not love.quit or not love.quit() then
 					if not love.quit or not love.quit() then
-						if love.audio then
-							love.audio.stop()
-						end
 						return
 						return
 					end
 					end
 				end
 				end

+ 0 - 5
src/scripts/boot.lua.h

@@ -892,11 +892,6 @@ const unsigned char boot_lua[] =
 	0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x71, 
 	0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x71, 
 	0x75, 0x69, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x71, 0x75, 
 	0x75, 0x69, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x71, 0x75, 
 	0x69, 0x74, 0x28, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
 	0x69, 0x74, 0x28, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 
-	0x6f, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2e, 
-	0x73, 0x74, 0x6f, 0x70, 0x28, 0x29, 0x0a,
-	0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x0a,
 	0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x0a,
 	0x09, 0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,