]> gitweb.factorcode.org Git - factor.git/commitdiff
update game.worlds and gpu.demo.raytrace for audio.engine changes
authorJoe Groff <arcata@gmail.com>
Wed, 20 Jan 2010 19:44:18 +0000 (11:44 -0800)
committerJoe Groff <arcata@gmail.com>
Wed, 20 Jan 2010 19:44:18 +0000 (11:44 -0800)
extra/game/worlds/worlds-docs.factor
extra/game/worlds/worlds.factor
extra/gpu/demos/raytrace/raytrace.factor

index 47eb81c2fa00217b48687cfe5428bb99e14328cc..c10ae4056130bd70c3133b29d6ce9a518828bc43 100644 (file)
@@ -11,8 +11,6 @@ HELP: game-attributes
 { { $snippet "use-audio-engine?" } " specifies whether the game world should manage an " { $link audio-engine } " instance. False by default." }
 { { $snippet "audio-engine-device" } " specifies the string name of the OpenAL device the audio engine, if any, should try to open. The default value of " { $link POSTPONE: f } " attempts to open the default OpenAL device." }
 { { $snippet "audio-engine-voice-count" } " determines the number of independent voices the audio engine will make available. This determines how many individual audio clips can play simultaneously. This cannot exceed the OpenAL implementation's limit on supported voices." }
-{ { $snippet "audio-engine-buffer-size" } " determines the size in bytes of the audio buffers the audio engine will stream to the sound card." }
-{ { $snippet "audio-engine-buffer-count" } " determines the number of buffers the audio engine will allocate per audio clip played." }
 } ;
 
 HELP: game-world
index cf75d37b39c0c696605ed8482e0fc749a854e509..dd9b2431c921309793ba05d1a4f3999df74bf7d9 100644 (file)
@@ -12,8 +12,6 @@ TUPLE: game-world < world
     { use-audio-engine? boolean }
     { audio-engine-device initial: f }
     { audio-engine-voice-count initial: 16 }
-    { audio-engine-buffer-size initial: 8192 }
-    { audio-engine-buffer-count initial: 2 }
     { tick-slice float initial: 0.0 } ;
 
 GENERIC: begin-game-world ( world -- )
@@ -38,8 +36,6 @@ M: game-world draw*
     {
         [ audio-engine-device>> ]
         [ audio-engine-voice-count>> ]
-        [ audio-engine-buffer-size>> ]
-        [ audio-engine-buffer-count>> ]
     } cleave <audio-engine>
     [ start-audio* ] keep ; inline
 
@@ -63,9 +59,7 @@ TUPLE: game-attributes < world-attributes
     { use-game-input? boolean initial: f }
     { use-audio-engine? boolean initial: f }
     { audio-engine-device initial: f }
-    { audio-engine-voice-count initial: 16 }
-    { audio-engine-buffer-size initial: 8192 }
-    { audio-engine-buffer-count initial: 2 } ;
+    { audio-engine-voice-count initial: 16 } ;
 
 M: game-world apply-world-attributes
     {
@@ -74,8 +68,6 @@ M: game-world apply-world-attributes
         [ use-audio-engine?>> >>use-audio-engine? ]
         [ audio-engine-device>> >>audio-engine-device ]
         [ audio-engine-voice-count>> >>audio-engine-voice-count ]
-        [ audio-engine-buffer-size>> >>audio-engine-buffer-size ]
-        [ audio-engine-buffer-count>> >>audio-engine-buffer-count ]
         [ call-next-method ]
     } cleave ;
 
index 54912544f1defa4ed9da9a497b208cb3ce8c5877..5dcd5eeedc4871b815a9114b7ff62a2dccc297fe 100644 (file)
@@ -79,13 +79,13 @@ CONSTANT: initial-spheres {
     audio-engine world >>listener update-audio
 
     audio-engine "vocab:gpu/demos/raytrace/mirror-ball.aiff" read-audio
-    spheres first t (audio-clip)
+    spheres first t <static-audio-clip>
     audio-engine "vocab:gpu/demos/raytrace/red-ball.aiff" read-audio
-    spheres second t (audio-clip)
+    spheres second t <static-audio-clip>
     audio-engine "vocab:gpu/demos/raytrace/green-ball.aiff" read-audio
-    spheres third t (audio-clip)
+    spheres third t <static-audio-clip>
     audio-engine "vocab:gpu/demos/raytrace/yellow-ball.aiff" read-audio
-    spheres fourth t (audio-clip)
+    spheres fourth t <static-audio-clip>
     
     4array play-clips ;
 
@@ -124,7 +124,6 @@ GAME: raytrace-game {
         { grab-input? t }
         { use-game-input? t }
         { use-audio-engine? t }
-        { audio-engine-buffer-count 4 }
         { pref-dim { 1024 768 } }
         { tick-interval-micros $[ 60 fps ] }
     } ;