
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://www.oesf.org/skins/common/feed.css?97"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Audio Howto - Revision history</title>
		<link>http://www.oesf.org/index.php?title=Audio_Howto&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.11.0</generator>
		<lastBuildDate>Sat, 25 May 2013 05:04:09 GMT</lastBuildDate>
		<item>
			<title>Offroadgeek at 02:41, 28 November 2004</title>
			<link>http://www.oesf.org/index.php?title=Audio_Howto&amp;diff=9035&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 02:41, 28 November 2004&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;&lt;!-- Bad Behavior 2.0.11 run time: 15.277 ms --&gt;&lt;p&gt;Line 47:
&lt;/p&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;&lt;!-- Bad Behavior 2.0.11 run time: 15.277 ms --&gt;&lt;p&gt;Line 47:
&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;(*) NOTE: There is a bug on the Zaurus with QSound not being able to play sounds shorter than about 8k.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;(*) NOTE: There is a bug on the Zaurus with QSound not being able to play sounds shorter than about 8k.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;!&lt;/del&gt;Using oss with the Zaurus:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Using oss with the Zaurus:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;!&lt;/del&gt;Playing sounds:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Playing sounds:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  #include &amp;lt;sys/ioctl.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  #include &amp;lt;sys/ioctl.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;&lt;!-- Bad Behavior 2.0.11 run time: 15.277 ms --&gt;&lt;p&gt;Line 81:
&lt;/p&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;&lt;!-- Bad Behavior 2.0.11 run time: 15.277 ms --&gt;&lt;p&gt;Line 81:
&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  QFile track( &amp;quot;/opt/&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;!&lt;/del&gt;QtPalmtop/sounds/somesound.wav&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  QFile track( &amp;quot;/opt/QtPalmtop/sounds/somesound.wav&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  if( &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;!&lt;/del&gt;track.open( &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;IO_!ReadOnly &lt;/del&gt;)) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  if( track.open( &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;IO_ReadOnly &lt;/ins&gt;)) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  QMessageBox:message(&amp;quot;Sounds&amp;quot;,&amp;quot;There was an error opening the wav file&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  QMessageBox:message(&amp;quot;Sounds&amp;quot;,&amp;quot;There was an error opening the wav file&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    return -1;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    return -1;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;&lt;!-- Bad Behavior 2.0.11 run time: 15.277 ms --&gt;&lt;p&gt;Line 90:
&lt;/p&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;&lt;!-- Bad Behavior 2.0.11 run time: 15.277 ms --&gt;&lt;p&gt;Line 90:
&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  int oldStyleFileHandle = track.handle();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  int oldStyleFileHandle = track.handle();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    int length;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    int length;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    while( &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;!&lt;/del&gt;track.atEnd()) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    while( track.atEnd()) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    length = ::read( oldStyleFileHandle, soundBuffer, 1024 ); //read from the file&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    length = ::read( oldStyleFileHandle, soundBuffer, 1024 ); //read from the file&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    ::write( dsp, soundBuffer, length); //write to the device&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    ::write( dsp, soundBuffer, length); //write to the device&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;&lt;!-- Bad Behavior 2.0.11 run time: 15.277 ms --&gt;&lt;p&gt;Line 98:
&lt;/p&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;&lt;!-- Bad Behavior 2.0.11 run time: 15.277 ms --&gt;&lt;p&gt;Line 98:
&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    track.close();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    track.close();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;!&lt;/del&gt;To record:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;To record:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  #include &amp;lt;sys/ioctl.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;  #include &amp;lt;sys/ioctl.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;&lt;!-- Bad Behavior 2.0.11 run time: 15.277 ms --&gt;&lt;p&gt;Line 137:
&lt;/p&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;&lt;!-- Bad Behavior 2.0.11 run time: 15.277 ms --&gt;&lt;p&gt;Line 137:
&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  QFile track( &amp;quot;/opt/&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;!&lt;/del&gt;QtPalmtop/sounds/myNewSound.wav&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  QFile track( &amp;quot;/opt/QtPalmtop/sounds/myNewSound.wav&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  if( &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;!&lt;/del&gt;track.open( &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;IO_!WriteOnly &lt;/del&gt;| IO_Truncate )) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  if( track.open( &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;IO_WriteOnly &lt;/ins&gt;| IO_Truncate )) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  QMessageBox:message(&amp;quot;Sounds&amp;quot;,&amp;quot;There was an error opening the wav file&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:  QMessageBox:message(&amp;quot;Sounds&amp;quot;,&amp;quot;There was an error opening the wav file&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    return -1;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;;:    return -1;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Sun, 28 Nov 2004 02:41:40 GMT</pubDate>			<dc:creator>Offroadgeek</dc:creator>			<comments>http://www.oesf.org/index.php?title=Talk:Audio_Howto</comments>		</item>
		<item>
			<title>Offroadgeek at 02:40, 28 November 2004</title>
			<link>http://www.oesf.org/index.php?title=Audio_Howto&amp;diff=55&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Zaurus audio development howto:&lt;br /&gt;
by L.J. Potter&lt;br /&gt;
&lt;br /&gt;
To get brief audio device info: run this command from the console:&lt;br /&gt;
  # cat /dev/sndstat&lt;br /&gt;
&lt;br /&gt;
The VERY easiest way to play sound is to use use cat command such as this:&lt;br /&gt;
  # cat myNewSound &amp;gt;/dev/dsp&lt;br /&gt;
;:or in a program, use system()&lt;br /&gt;
;:system( &amp;quot;cat myNewSound &amp;gt;/dev/dsp&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
The VERY easiest way to record sound is to use use cat command such as this:&lt;br /&gt;
  # cat /dev/dsp1 &amp;gt;myNewSound&lt;br /&gt;
;:or in a program, use system()&lt;br /&gt;
;:system( &amp;quot;cat /dev/dsp1 &amp;gt;myNewSound&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This is not the most elegant way to do this.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
The next easiest way to play audio is to use QSound:&lt;br /&gt;
The benefits are that you should be able to play more than one sound at a time.&lt;br /&gt;
(*) NOTE: there is no QSound::record()&lt;br /&gt;
&lt;br /&gt;
  #include &amp;lt;qsound.h&amp;gt;&lt;br /&gt;
  #include &amp;lt;qpe/resource.h&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
;:QSound::play( Resource::findSound(&amp;quot;ohdear&amp;quot;) );&lt;br /&gt;
&lt;br /&gt;
(*) NOTE: There is a bug on the Zaurus with QSound not being able to play sounds&lt;br /&gt;
shorter than about 8k.&lt;br /&gt;
----&lt;br /&gt;
or if you can use Qtopia's Sound class to loop sounds:&lt;br /&gt;
(there's no docs, so grab the qtopia cvs at sourceforge&lt;br /&gt;
and look in the source)&lt;br /&gt;
&lt;br /&gt;
  #include &amp;lt;qpe/sound.h&amp;gt;&lt;br /&gt;
  #include &amp;lt;qpe/resource.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;:Sound::soundAlarm();&lt;br /&gt;
&lt;br /&gt;
or something like:&lt;br /&gt;
&lt;br /&gt;
;:Sound mySound( Resource::findSound(&amp;quot;ohdear&amp;quot;) );&lt;br /&gt;
;:mySound.playLoop();&lt;br /&gt;
;:mySound.stop();&lt;br /&gt;
&lt;br /&gt;
(*) NOTE: There is a bug on the Zaurus with QSound not being able to play sounds shorter than about 8k.&lt;br /&gt;
----&lt;br /&gt;
!Using oss with the Zaurus:&lt;br /&gt;
!Playing sounds:&lt;br /&gt;
&lt;br /&gt;
  #include &amp;lt;sys/ioctl.h&amp;gt;&lt;br /&gt;
  #include &amp;lt;linux/soundcard.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;:    int speed = 44100;&lt;br /&gt;
;:    int channels = 2;&lt;br /&gt;
;:    int format = AFMT_S16_LE; // or AFMT_U8, but has buggy output on the Z&lt;br /&gt;
;:    int dsp=0;&lt;br /&gt;
;:    signed short soundBuffer[1024];&lt;br /&gt;
&lt;br /&gt;
;:    dsp = ::open(&amp;quot;/dev/dsp&amp;quot;, O_WRONLY);&lt;br /&gt;
;:        if( dsp == -1)  {&lt;br /&gt;
;:       perror(&amp;quot;open(\&amp;quot;/dev/dsp\&amp;quot;)&amp;quot;);&lt;br /&gt;
;:       return;&lt;br /&gt;
;:        }&lt;br /&gt;
    &lt;br /&gt;
  // this is assuming you know what the format of the wav file is.&lt;br /&gt;
  // otherwise you'd have to read the header file first.&lt;br /&gt;
&lt;br /&gt;
;:    if( ioctl( dsp, SNDCTL_DSP_SETFMT , &amp;amp;format)==-1)  {&lt;br /&gt;
;:        perror(&amp;quot;ioctl(\&amp;quot;SNDCTL_DSP_SETFMT\&amp;quot;)&amp;quot;);&lt;br /&gt;
;:        return -1;&lt;br /&gt;
;:    }&lt;br /&gt;
;:    if( ioctl( dsp, SNDCTL_DSP_CHANNELS , &amp;amp;channels)==-1)  {&lt;br /&gt;
;:        perror(&amp;quot;ioctl(\&amp;quot;SNDCTL_DSP_CHANNELS\&amp;quot;)&amp;quot;);&lt;br /&gt;
;:        return -1;&lt;br /&gt;
;:    }&lt;br /&gt;
;:    if( ioctl( dsp, SNDCTL_DSP_SPEED , &amp;amp;speed)==-1)  {&lt;br /&gt;
;:        perror(&amp;quot;ioctl(\&amp;quot;SNDCTL_DSP_SPEED\&amp;quot;)&amp;quot;);&lt;br /&gt;
;:        return -1;&lt;br /&gt;
;:    }&lt;br /&gt;
&lt;br /&gt;
;:  QFile track( &amp;quot;/opt/!QtPalmtop/sounds/somesound.wav&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
;:  if( !track.open( IO_!ReadOnly )) {&lt;br /&gt;
;:  QMessageBox:message(&amp;quot;Sounds&amp;quot;,&amp;quot;There was an error opening the wav file&amp;quot;);&lt;br /&gt;
;:    return -1;&lt;br /&gt;
;:  }&lt;br /&gt;
&lt;br /&gt;
;:  int oldStyleFileHandle = track.handle();&lt;br /&gt;
;:    int length;&lt;br /&gt;
;:    while( !track.atEnd()) {&lt;br /&gt;
;:    length = ::read( oldStyleFileHandle, soundBuffer, 1024 ); //read from the file&lt;br /&gt;
;:    ::write( dsp, soundBuffer, length); //write to the device&lt;br /&gt;
;:    }&lt;br /&gt;
&lt;br /&gt;
;:    ::close (dsp);&lt;br /&gt;
;:    track.close();&lt;br /&gt;
----&lt;br /&gt;
!To record:&lt;br /&gt;
&lt;br /&gt;
  #include &amp;lt;sys/ioctl.h&amp;gt;&lt;br /&gt;
  #include &amp;lt;linux/soundcard.h&amp;gt;&lt;br /&gt;
;:    int speed = 22050;&lt;br /&gt;
;:    int channels = 1;&lt;br /&gt;
;://  *NOTE* the Zaurus input is ONLY mono !!&lt;br /&gt;
&lt;br /&gt;
;:    int format = AFMT_S16_LE;&lt;br /&gt;
;:    int dsp=0;&lt;br /&gt;
;:    signed short soundBuffer[1024];&lt;br /&gt;
&lt;br /&gt;
;:    dsp = ::open(&amp;quot;/dev/dsp1&amp;quot;, O_RDONLY);&lt;br /&gt;
&lt;br /&gt;
;:// *NOTE* the Zaurus has a nonstandard input&lt;br /&gt;
;:// so /dev/dsp1 must be opened when&lt;br /&gt;
;:// recording&lt;br /&gt;
&lt;br /&gt;
;:        if( dsp == -1)  {&lt;br /&gt;
;:       perror(&amp;quot;open(\&amp;quot;/dev/dsp\&amp;quot;)&amp;quot;);&lt;br /&gt;
;:       return;&lt;br /&gt;
;:        }&lt;br /&gt;
&lt;br /&gt;
;:    // this is assuming you know what the format of the wav file is.&lt;br /&gt;
;:    // otherwise you'd have to read the header file first.&lt;br /&gt;
&lt;br /&gt;
;:    if( ioctl( dsp, SNDCTL_DSP_SETFMT , &amp;amp;format)==-1)  {&lt;br /&gt;
;:        perror(&amp;quot;ioctl(\&amp;quot;SNDCTL_DSP_SETFMT\&amp;quot;)&amp;quot;);&lt;br /&gt;
;:        return -1;&lt;br /&gt;
;:    }&lt;br /&gt;
;:    if( ioctl( dsp, SNDCTL_DSP_CHANNELS , &amp;amp;channels)==-1)  {&lt;br /&gt;
;:        perror(&amp;quot;ioctl(\&amp;quot;SNDCTL_DSP_CHANNELS\&amp;quot;)&amp;quot;);&lt;br /&gt;
;:        return -1;&lt;br /&gt;
;:    }&lt;br /&gt;
;:    if( ioctl( dsp, SNDCTL_DSP_SPEED , &amp;amp;speed)==-1)  {&lt;br /&gt;
;:        perror(&amp;quot;ioctl(\&amp;quot;SNDCTL_DSP_SPEED\&amp;quot;)&amp;quot;);&lt;br /&gt;
;:        return -1;&lt;br /&gt;
;:    }&lt;br /&gt;
&lt;br /&gt;
;:  QFile track( &amp;quot;/opt/!QtPalmtop/sounds/myNewSound.wav&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
;:  if( !track.open( IO_!WriteOnly | IO_Truncate )) {&lt;br /&gt;
;:  QMessageBox:message(&amp;quot;Sounds&amp;quot;,&amp;quot;There was an error opening the wav file&amp;quot;);&lt;br /&gt;
;:    return -1;&lt;br /&gt;
;:  }&lt;br /&gt;
&lt;br /&gt;
;:  int oldStyleFileHandle = track.handle();&lt;br /&gt;
&lt;br /&gt;
;:    int length;&lt;br /&gt;
;:    while( 1) {  // or some other way to stop this crazy thing&lt;br /&gt;
&lt;br /&gt;
;:    length = ::read( dsp, soundBuffer, 1024 ); //read from the file&lt;br /&gt;
;:    ::write(  oldStyleFileHandle, soundBuffer, length); //write to the device&lt;br /&gt;
;:    }&lt;br /&gt;
&lt;br /&gt;
;:    ::close (dsp);&lt;br /&gt;
;:    track.close();&lt;br /&gt;
&lt;br /&gt;
;:// to make a standard wav file, you would need to write&lt;br /&gt;
;:// a header before you start writing from the device, and then&lt;br /&gt;
;:// write to the header after you finish&lt;br /&gt;
&lt;br /&gt;
For more information about programming OSS, visit:&lt;br /&gt;
http://www.opensound.com&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
This page was last updated: May 21 2003 06:25:12.&lt;/div&gt;</description>
			<pubDate>Sun, 28 Nov 2004 02:40:07 GMT</pubDate>			<dc:creator>Offroadgeek</dc:creator>			<comments>http://www.oesf.org/index.php?title=Talk:Audio_Howto</comments>		</item>
	</channel>
</rss>