DirectSound sound management



  • How do you reproduce mp3 files through the DirectSound Library at C#? Wav files learned without problems

    device = new Device();
    device.SetCooperativeLevel(this, CooperativeLevel.Normal);
    sound = new SecondaryBuffer(filePath, device);
    sound.Play(0, BufferPlayFlags.Default);
    

    Here's the problem with mp3:

    Необработанное исключение типа "System.ArgumentException" в  Microsoft.DirectX.DirectSound.dll
    

    Additional information: The value does not fall into the expected range.

    I tried to:

    stream = new Microsoft.DirectX.DirectSound.Buffer(filePath, device);
    stream.Play(0,BufferPlayFlags.Default);
    sound = new SecondaryBuffer(stream, device);
    sound.Play(0, BufferPlayFlags.Default);   
    

    It's the same thing.



  • Library Direct Sound does not support formats mp3
    For reproduction mp3- Files can be used by another crowd. https://msdn.microsoft.com/ru-ru/library/windows/desktop/dd375454(v=vs.85).aspx


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2