In accordance with an aspect, a method is provided to operate an electronics device so as to intelligently combine audio based on asynchronous events, such as game playing, with audio output nominally generated in a predictive manner, such as resulting from media playback. For example, an overall audio output signal for the electronic device may be generated such that, for at least one of audio channels corresponding to predictive manner processing, the generated audio output for that channel included into the overall audio output signal is based at least in part on configuration information associated with a processed audio output signal for at least one of the audio channels corresponding to asynchronous events based processing. Thus, for example, the game audio processing may control how audio effects from the game are combined with audio effects from media playback.
The game playing processing 101 may include processing of a game, typically including both video and audio output, in response to user input via user interface functionality of the portable media player. Meanwhile the game application 116 may operate to, among other things, provide game video to a display 112 of the portable media player 110. The game application 116 is an example of non-media-playback processing. That is, the game video provided to the display 112 of the portable media player 110 is substantially responsive to game-playing actions of a user of the portable media player 110. In this respect, the game video is not nominally generated in a predictive manner, as is the case with media playback processing.
Sound effects of the game playing processing 101 may be defined by a combination of “data” and “specification” portions, such as is denoted by reference numerals 104(1) to 104(4) in
The specification may further include desired output parameters for the sound effect, such as volume, pitch and left/right pan. In some examples, the desired output parameters may be modified manually (i.e., by a user via a user interface) or programmatically.
Furthermore, in some examples, a sound effect may be specified according to a loop parameter, which may specify a number of times to repeat the sound effect. For example, a loop parameter may specify one, N times, or forever.
In addition, a sound effect definition may be chained to one or more other sound effects definitions, with a specified pause between sound effects. A sequence of sound effects may be pre-constructed and substantially without application intervention after configuration. For example, one useful application of chained sound effects is to build phrases of speech.
Turning again to
By combining game playing and media playback experiences, the user experience is synergistically increased.
At step 306, the processed sound effects for all channels are combined. At step 308, the combined sound effects signal and media playback signal are combined, with the media playback signal being faded as appropriate based on mixing data associated with the sound effects.
Reference numerals 406, 408 and 410 indicate different processing paths. Path 406 is taken when a sound effect has an associated loop specification. At step 412, the loop count is incremented. At step 414, it is determined if the looped specification processing is finished. If so, then processing for the sound effect ends. Otherwise, processing returns to step 405.
Path 410 is taken when the sound effect has an associated chain specification. At step 416, the next specification in the chain is found, and then processing returns to step 402 to begin processing for the signal data of the next specification.
Path 408 is taken when the sound effect has neither an associated loop specification or an associated chain specification, and processing for the sound effect ends.
In some examples, it is determined to cause not include in the output audio signal 110 audio corresponding to one or more sound effects, even though the audio corresponding those one or more sound effects would nominally be included in the output audio signal 110. For example, this may occur when there are more sound effect descriptors than can be played (or desirably played) simultaneously, based on processing or other capabilities. Channels are fixed, small resources—they may be considered to be available slots that are always present. The number of sound effect descriptors that can be created is not limited by the number of available channels. However, for a sound effect to be included in the output audio signal, that sound effect is attached to a channel. The number of channels can change at runtime but, typically, at least the maximum number of available channels is predetermined (e.g., at compile time).
The determination of which sounds effects to omit may be based on priorities. As another example, a least recently used (LRU) determination may be applied. In this way, for example, the sound effect started the longest ago is the first sound effect omitted based on a request for a new sound effect.
In accordance with one example, then, the following processing may be applied.
In one example, the sound effects mixer inquires of each channel 102 whether that channel is active. For example, this inquiry may occur at regular intervals. If a channel is determined to be not active (e.g., for some number of consecutive inquiries, the channel report being not active), then the channel may be made available to a newly-requested sound effect.
We have described how game audio processing may control how audio effects from non-media-playback processing (such as, for example, a game) are combined with audio effects from media playback, such that, for example, an audio experience pleasurable to the user may be provided.
The following applications are incorporated herein by reference in their entirety: U.S. patent application Ser. No. ______, filed concurrently herewith, entitled “TECHNIQUES FOR INTERACTIVE INPUT TO PORTABLE ELECTRONIC DEVICES,” (Atty Docket No. APL1P486/P4322US1); U.S. patent application Ser. No. ______, filed concurrently herewith, entitled “ALLOWING MEDIA AND GAMING ENVIRONMENTS TO EFFECTIVELY INTERACT AND/OR AFFECT EACH OTHER,” (Atty Docket No. APL1P487/P4323US1); and U.S. patent application Ser. No. 11/144,541, filed Jun. 3, 2005, entitled “TECHNIQUES FOR PRESENTING SOUND EFFECTS ON A PORTABLE MEDIA PLAYER,”.