Apple Newton Utilities Uživatelská příručka Strana 557

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 942
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 556
CHAPTER 14
Sound
About Newton Sound 14-3
For example, to play a sound in ROM when the view opens, place its name in the
view’s
showSound slot.
In fact, all
ROM_soundName constants are pointers to Newton sound frames stored
in ROM. Instead of using one of these constants; however, you can store a Newton
sound frame in a slot, causing the sound stored in that frame to play in
accompaniment to the event associated with that slot. The next section describes
the format of a Newton sound frame.
Sound Data Structures 14
Three data structures are related to sounds: a sound frame, a sound result frame,
and a
protoSoundChannel.
A sound frame stores sound sample data and additional information used internally
by the system. A sound result frame returns information to the sound frame when
the sound channel stops or pauses. Like any other frame, a sound frame and sound
result frame cannot be greater than 32 KB in size. See “Sound Data Structures”
(page 11-1) in the Newton Programmers Reference, for a complete list of slots
required by for both types of frames.
The
protoSoundChannel provides methods that implement pause and playback
of sounds and completion callbacks. It also provides query methods that return
whether the sound is running or paused.
If you are providing custom sounds, you can store them as virtual binary objects.
An example of storing a sound as a VBO is given in Chapter 11, “Data Storage and
Retrieval.”.
Compatibility 14
Sound frames have been extended so that those in version 1.x can be played
without modication by devices based on version 2.0 of the Newton ROM. Not all
Newton 2.0 sound frames can be played by older Newton devices.
Two new functions have been added:
PlaySoundAtVolume and
PlaySoundIrregardless. PlaySoundAtVolume plays a sound specified by
the sound frame at a specic volume level.
PlaySoundIrregardless plays a
sound no matter what the user’s settings are.
Zobrazit stránku 556
1 2 ... 552 553 554 555 556 557 558 559 560 561 562 ... 941 942

Komentáře k této Příručce

Žádné komentáře