<div dir="ltr"><div>You can also reduce the test case to "can I hear anything or not" by filling a buffer with white noise instead of trying a WAV file if you think the file loader is the problem:</div><div><br></div><div><span style="font-family:monospace">const ALsizei freq = 44100; //samples / sec<br></span></div><div><span style="font-family:monospace">const ALsizei noise_size = freq * sizeof(int16_t) ; // 1 second * 44100 samples / second  * 2 bytes  / sample = 88200 bytes<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">//Generate white noise<br></span></div><div><span style="font-family:monospace">srand(time(NULL));<br></span></div><div><span style="font-family:monospace">int16_t* noise = malloc(noise_size); <br></span></div><div><span style="font-family:monospace">for(int i=0; i<freq; i++) {</span></div><div><span style="font-family:monospace">     noise[i] = (int16_t)(rand() & 0xFFFF);</span></div><div><span style="font-family:monospace">}<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">alBufferData(source[0], AL_FORMAT_MONO16, noise, noise_size, freq);<br></span><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 2, 2022 at 8:17 AM Sean <<a href="mailto:s.tolstoyevski@gmail.com">s.tolstoyevski@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>Use dr_libs to load wav files correctly.<br>
      <br>
    </p>
    <div>On 01/03/2022 22:16, Jana Cole wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:12pt">
        <p style="margin:0.1rem 0px;line-height:1">Hello,</p>
        <p style="margin:0.1rem 0px;line-height:1"> </p>
        <p style="margin:0.1rem 0px;line-height:1">I'm hoping to get
          some help with some code where I'm getting no errors, but also
          no sound. It seems to be correct, based on the programmer's
          guide, but I must be missing something. </p>
        <p style="margin:0.1rem 0px;line-height:1"> </p>
        <p style="margin:0.1rem 0px;line-height:1">I posted the code
          here, it's 368 lines:  <a href="https://pastebin.com/mqCrx2KX" target="_blank">https://pastebin.com/mqCrx2KX</a></p>
        <p style="margin:0.1rem 0px;line-height:1"> </p>
        <p style="margin:0.1rem 0px;line-height:1">I've tried
          everything I can think of, checking for errors, checking all
          return types, putting couts in strategic places, my sound
          generally works on my laptop, I tried different sound files.
          The one I'm using plays fine on Windows Media Player. It's
          44100Hz, 16-bit stereo. It's one second long.</p>
        <p style="margin:0.1rem 0px;line-height:1"> </p>
        <p style="margin:0.1rem 0px;line-height:1">I'm on Visual
          Studio, Windows 10.</p>
        <p style="margin:0.1rem 0px;line-height:1">I'm linking to
          OpenAL32.lib. </p>
        <p style="margin:0.1rem 0px;line-height:1"> </p>
        <p style="margin:0.1rem 0px;line-height:1">I'd be very
          grateful for any help or suggestions on this.</p>
        <p style="margin:0.1rem 0px;line-height:1"> </p>
        <p style="margin:0.1rem 0px;line-height:1">Thanks in advance
          for any suggestions.</p>
        <p style="margin:0.1rem 0px;line-height:1"> </p>
        <p style="margin:0.1rem 0px;line-height:1">Jana in San
          Francisco</p>
        <p style="margin:0.1rem 0px;line-height:1"> </p>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
openal mailing list
<a href="mailto:openal@openal.org" target="_blank">openal@openal.org</a>
<a href="http://openal.org/mailman/listinfo/openal" target="_blank">http://openal.org/mailman/listinfo/openal</a>
</pre>
    </blockquote>
  </div>

_______________________________________________<br>
openal mailing list<br>
<a href="mailto:openal@openal.org" target="_blank">openal@openal.org</a><br>
<a href="http://openal.org/mailman/listinfo/openal" rel="noreferrer" target="_blank">http://openal.org/mailman/listinfo/openal</a><br>
</blockquote></div>