<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Newbie Question Regarding DirectSound' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Newbie Question Regarding DirectSound' posted on the 'Visual Basic' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Wed, 23 May 2012 06:57:27 -0700</pubDate>
    <lastBuildDate>Wed, 23 May 2012 06:57:27 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Newbie Question Regarding DirectSound</title>
      <link>http://www.programmersheaven.com/mb/VBasic/409016/409016/newbie-question-regarding-directsound/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I am currently developing a PC game based on the game show &lt;em&gt;Card Sharks&lt;/em&gt;, and I am experiencing a dilemma as of recently.&lt;br /&gt;
&lt;br /&gt;
I am hoping to use more than one DSBuffer (I would use, for example, "SoundClipA.wav", "SoundClipB.wav", and "SoundClipC.wav").&lt;br /&gt;
&lt;br /&gt;
If I were to have separate cases using the DSBuffers mentioned above, like this:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
    Case PlayIntro
        Dim cur As DSCURSORS
        DSBuffer.GetCurrentPosition cur
        contBkgd(1).Visible = True
        If cur.lPlay &amp;gt; 104861 Then 'bytes
          Label1.Caption = "This is an EDUCATED GUESS question."
          Command1.Enabled = True
        ElseIf cur.lPlay &amp;gt; 82785 Then 'bytes
          If QuesRB(0).Caption = "B" Then
            WhosTurn = BluePlayer
            Label1.Caption = "Blue, this question is for you."
            BBorder(1).Visible = True
            board.Visible = False
          ElseIf QuesRB(0).Caption = "R" Then
            WhosTurn = RedPlayer
            Label1.Caption = "Red, this question is for you."
            RBorder(1).Visible = True
          End If
            Image1(0).Visible = False
            Image1(1).Visible = False
            Image1(2).Visible = False
            Image1(3).Visible = False
            Image1(4).Visible = False
            Image2(0).Visible = False
            Image2(1).Visible = False
            Image2(2).Visible = False
            Image2(3).Visible = False
            Image2(4).Visible = False
    '          Timer1.Enabled = False
        ElseIf cur.lPlay &amp;gt; 75250 Then
          Image2(4).Visible = True
        ElseIf cur.lPlay &amp;gt; 67725 Then
          Image2(3).Visible = True
        ElseIf cur.lPlay &amp;gt; 60200 Then
          Image1(4).Visible = True
        ElseIf cur.lPlay &amp;gt; 52625 Then
          Image2(2).Visible = True
        ElseIf cur.lPlay &amp;gt; 45150 Then
          Image1(3).Visible = True
        ElseIf cur.lPlay &amp;gt; 37625 Then
          Image2(1).Visible = True
        ElseIf cur.lPlay &amp;gt; 30100 Then
          Image1(2).Visible = True
        ElseIf cur.lPlay &amp;gt; 22575 Then
          Image2(0).Visible = True
        ElseIf cur.lPlay &amp;gt; 15050 Then
          Image1(1).Visible = True
        ElseIf cur.lPlay &amp;gt; 7525 Then
          Image1(0).Visible = True
        ElseIf cur.lPlay &amp;gt; 0 Then
          board.Visible = True
        End If&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
And I was to use the "SoundClipB.wav" in another case, like this:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
    Case PlayIntro2
        Dim cur As DSCURSORS
        DSBuffer.GetCurrentPosition cur
        contBkgd(1).Visible = True
        If cur.lPlay &amp;gt; 104861 Then 'bytes
          Label1.Caption = "We surveyed 100 people..."
          Command1.Enabled = True
        ElseIf cur.lPlay &amp;gt; 82785 Then 'bytes
          If QuesRB(0).Caption = "B" Then
            WhosTurn = BluePlayer
            Label1.Caption = "Blue, this question is for you."
            BBorder(1).Visible = True
            board.Visible = False
          ElseIf QuesRB(0).Caption = "R" Then
            WhosTurn = RedPlayer
            Label1.Caption = "Red, this question is for you."
            RBorder(1).Visible = True
          End If
            Image1(0).Visible = False
            Image1(1).Visible = False
            Image1(2).Visible = False
            Image1(3).Visible = False
            Image1(4).Visible = False
            Image2(0).Visible = False
            Image2(1).Visible = False
            Image2(2).Visible = False
            Image2(3).Visible = False
            Image2(4).Visible = False
    '          Timer1.Enabled = False
        ElseIf cur.lPlay &amp;gt; 75250 Then
          Image2(4).Visible = True
        ElseIf cur.lPlay &amp;gt; 67725 Then
          Image2(3).Visible = True
        ElseIf cur.lPlay &amp;gt; 60200 Then
          Image1(4).Visible = True
        ElseIf cur.lPlay &amp;gt; 52625 Then
          Image2(2).Visible = True
        ElseIf cur.lPlay &amp;gt; 45150 Then
          Image1(3).Visible = True
        ElseIf cur.lPlay &amp;gt; 37625 Then
          Image2(1).Visible = True
        ElseIf cur.lPlay &amp;gt; 30100 Then
          Image1(2).Visible = True
        ElseIf cur.lPlay &amp;gt; 22575 Then
          Image2(0).Visible = True
        ElseIf cur.lPlay &amp;gt; 15050 Then
          Image1(1).Visible = True
        ElseIf cur.lPlay &amp;gt; 7525 Then
          Image1(0).Visible = True
        ElseIf cur.lPlay &amp;gt; 0 Then
          board.Visible = True
        End If&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
...what would I have to do in order to allow those DSBuffers to play in those separate cases?  Would I be required to use Private Subs for those separate DSBuffers?  Would anybody be able to provide a sample code?</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBasic/409016/409016/newbie-question-regarding-directsound/</guid>
      <pubDate>Tue, 10 Nov 2009 04:47:55 -0700</pubDate>
      <category>Visual Basic</category>
    </item>
    <item>
      <title>Re: Newbie Question Regarding DirectSound</title>
      <link>http://www.programmersheaven.com/mb/VBasic/409016/411164/re-newbie-question-regarding-directsound/#411164</link>
      <description>I appreciate your productiveness.&lt;br /&gt;
&lt;br /&gt;
I have this suggestion for you:&lt;br /&gt;
1.) Use Subs&lt;br /&gt;
&lt;br /&gt;
Here is the sample code:&lt;br /&gt;
------------------------------------------------------------&lt;br /&gt;
'when you click a button&lt;br /&gt;
&lt;br /&gt;
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;br /&gt;
&lt;br /&gt;
Call Music1()&lt;br /&gt;
'call means execute a Sub&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
Sub Music1()&lt;br /&gt;
'Put the code here for playing a media file&lt;br /&gt;
End Sub&lt;br /&gt;
------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
I hope i helped you...&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBasic/409016/411164/re-newbie-question-regarding-directsound/#411164</guid>
      <pubDate>Thu, 24 Dec 2009 21:30:06 -0700</pubDate>
      <category>Visual Basic</category>
    </item>
  </channel>
</rss>
