Git Product home page Git Product logo

Comments (7)

flibitijibibo avatar flibitijibibo commented on July 19, 2024

So it's 22.5KHz, what about the compression, MSADPCM block align (if applicable) and the intended pitch, if any? From what I'm hearing it's playing at a higher pitch and speed, so AL_PITCH could be affecting the wavedata if said data is not being damaged before playback.

Focus your attention on these three methods:

SoundEffect alBufferData: https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/Audio/SoundEffect.cs#L560

CueData SFI generation: https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/Audio/CueData.cs#L688

XACTClip Constructor: https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/Audio/CueData.cs#L300

Compare the results against your intended effects in the XACT project, and the problem should show up.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 19, 2024

Ah, just took a closer look at the audio. This is 8-bit wavedata, is it not? I did not know XACT supported this. Is this available in the WaveBank data? Look around here with a hex editor and see if it shows up anywhere:

https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/Audio/WaveBank.cs#L194

from fna-mghistory.

3vi1 avatar 3vi1 commented on July 19, 2024

That's correct: it is 8-bit.

XACT seems to support it. You probably just haven't run into anyone else that uses such poor quality place-holder sounds as myself. :) (But I had to use that one, since it reminded me of my EverQuest days).

Here's a screenshot of it in the audio creation tool showing as 8-bit mono: http://www.eternaldusk.com/jl-misc/xact-1.png

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 19, 2024

Fair enough. If you really want to add 8-bit support, find out how the wBitsPerSample bit is read in the format, and add it to the INTERNAL_bufferData method. I probably won't look at this right away.

from fna-mghistory.

3vi1 avatar 3vi1 commented on July 19, 2024

No rush. I can use 16 bit sounds for my dabblings, I just thought you'd want to know in case some ports have 8-bit sounds buried deep within them.

I did take a look at the SoundEffect code but my knowledge of the audio formats is nil and I'm not sure how you even figured out which bits to shift out for the wavedata you already have, given the derth of WBND documentation.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 19, 2024

Do you still happen to have a WaveBank with an 8-bit PCM file in it? If you've got one that has both an 8-bit and 16-bit PCM file that'll be even better. I'm hoping I can just push this to OpenAL with the right type flag and call it a day, but we'll see.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on July 19, 2024

This revision should resolve this issue:

771d980

Needed to broaden the wavedata support in various parts, let me know if this doesn't fix it.

from fna-mghistory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.