From 87c09af8f339dfaea853798587c22e5b9e73b3cb Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Wed, 20 Jan 2010 11:44:18 -0800 Subject: [PATCH] update game.worlds and gpu.demo.raytrace for audio.engine changes --- extra/game/worlds/worlds-docs.factor | 2 -- extra/game/worlds/worlds.factor | 10 +--------- extra/gpu/demos/raytrace/raytrace.factor | 9 ++++----- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/extra/game/worlds/worlds-docs.factor b/extra/game/worlds/worlds-docs.factor index 47eb81c2fa..c10ae40561 100644 --- a/extra/game/worlds/worlds-docs.factor +++ b/extra/game/worlds/worlds-docs.factor @@ -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 diff --git a/extra/game/worlds/worlds.factor b/extra/game/worlds/worlds.factor index cf75d37b39..dd9b2431c9 100644 --- a/extra/game/worlds/worlds.factor +++ b/extra/game/worlds/worlds.factor @@ -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 [ 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 ; diff --git a/extra/gpu/demos/raytrace/raytrace.factor b/extra/gpu/demos/raytrace/raytrace.factor index 54912544f1..5dcd5eeedc 100644 --- a/extra/gpu/demos/raytrace/raytrace.factor +++ b/extra/gpu/demos/raytrace/raytrace.factor @@ -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 audio-engine "vocab:gpu/demos/raytrace/red-ball.aiff" read-audio - spheres second t (audio-clip) + spheres second t audio-engine "vocab:gpu/demos/raytrace/green-ball.aiff" read-audio - spheres third t (audio-clip) + spheres third t audio-engine "vocab:gpu/demos/raytrace/yellow-ball.aiff" read-audio - spheres fourth t (audio-clip) + spheres fourth t 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 ] } } ;