<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">In FNA we do something like this, but
      it's probably not ideal (if not just incorrect):<br>
      <br>
<a class="moz-txt-link-freetext" href="https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/Audio/SoundEffectInstance.cs#L58">https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/Audio/SoundEffectInstance.cs#L58</a><br>
      <br>
      I know for sure that this doesn't provide hard panning, but you
      probably didn't _really_ want to do hard pans anyway. We do that
      work to keep things at the 1.0f distance, but if attenuation isn't
      required for your project, you can turn that off and possibly save
      some time/effort:<br>
      <br>
<a class="moz-txt-link-freetext" href="https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/Audio/OpenALDevice.cs#L102">https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/Audio/OpenALDevice.cs#L102</a><br>
      <br>
      -Ethan<br>
      <br>
      On 04/20/2014 08:44 PM, Villermen wrote:<br>
    </div>
    <blockquote
cite="mid:CAK+vQdp5K+VJpuZ6uZBd+kicqhPTj5NMpUgU13HCrq3KTwnxOQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hey there, 
        <div><br>
        </div>
        <div>After not being able to figure this one out myself I've
          posted my question on the OpenTK forums and StackOverflow,
          where I was suggested by the OpenTK dev to ask you about it =)</div>
        <div><br>
        </div>
        <div>Basically I'd like to have a balance value of -1f (left
          channel only) to 1f (right channel only) be converted into a
          position for an OpenAL source where it will act as such:</div>
        <div><span style="color:rgb(0,0,0);font-family:Arial,'Liberation
            Sans','DejaVu
            Sans',sans-serif;font-size:14px;line-height:17.804800033569336px">When
            having 0f (default value) as balance value both sides
            (left/right ear) should be at 100% gain. </span></div>
        <div><span style="color:rgb(0,0,0);font-family:Arial,'Liberation
            Sans','DejaVu
            Sans',sans-serif;font-size:14px;line-height:17.804800033569336px">When
            1f 100% for the right ear and 0% for the left ear and the
            opposite for -1f.</span></div>
        <div><span style="color:rgb(0,0,0);font-family:Arial,'Liberation
            Sans','DejaVu
            Sans',sans-serif;font-size:14px;line-height:17.804800033569336px">They
            should attenuate in a linear way.</span></div>
        <div><br>
        </div>
        <div>For what I've tried so far please read <a
            moz-do-not-send="true"
href="http://stackoverflow.com/questions/23154049/linear-1d-audio-balance-with-openal">my
            post on StackOverflow</a>. I'm working with the OpenTK
          library but I am pretty sure I can convert any OpenAL related
          answer to it, just as long as I can understand it in general.</div>
        <div><br>
        </div>
        <div>I would really like to know if and how this is possible,
          and any thoughts on this are welcome!</div>
        <div><br>
        </div>
        <div>Gr.Villermen</div>
        <div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
openal mailing list
<a class="moz-txt-link-abbreviated" href="mailto:openal@openal.org">openal@openal.org</a>
<a class="moz-txt-link-freetext" href="http://openal.org/mailman/listinfo/openal">http://openal.org/mailman/listinfo/openal</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>