1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" /> 7 <title>Sound (snd) Sample Demo</title> 8 </head> 9 <body> 10 <h1>memorySoundArchive</h1> 11 12 <h2>Overview</h2> 13 <p> 14 Demonstrates how to use the <a href="../MemorySoundArchive/Overview.html">nw::snd::MemorySoundArchive</a> class. 15 </p> 16 17 <h2>How to Use</h2> 18 <p> 19 <ul> 20 <li>A Button: Plays the sequence sound</li> 21 <li>X Button: Plays the wave sound</li> 22 <li>B Button: Stops the sound</li> 23 </ul> 24 </p> 25 26 <h2>Description</h2> 27 <p> 28 Although <a href="../RomSoundArchive/Overview.html">nw::snd::RomSoundArchive</a> is used in other demos (such as simple), <a href="../MemorySoundArchive/Overview.html">nw::snd::MemorySoundArchive</a> is used in this demo. 29 </p> 30 <p> 31 Because MemorySoundArchive treats the specified memory region as a sound archive, items do not need to be loaded one-by-one as with RomSoundArchive. 32 </p> 33 <pre> 34 // Initializes the memory sound archive 35 { 36 nn::fs::FileReader reader( SOUND_ARC_PATH ); 37 s32 size = (s32)reader.GetSize(); 38 m_pMemoryForSoundArchive = MemAlloc( size, 32 ); 39 s32 readSize = reader.Read( m_pMemoryForSoundArchive, size ); 40 m_Archive.Initialize( m_pMemoryForSoundArchive ); 41 reader.Finalize(); 42 } 43 </pre> 44 <p> 45 Although the concept under SoundMaker is to split work up for each separate sound set, use of this features allows you to think in terms of splitting up work for each separate sound archive. 46 </p> 47 48 <h2>Revision History</h2> 49 <div class="section"> 50 <dl class="history"> 51 <dt>2010/09/27</dt> 52 <dd>Initial version.<br /> 53 </dd> 54 </dl> 55 </div> 56 <hr><p>CONFIDENTIAL</p></body> 57</html> 58 59