GithubHelp home page GithubHelp logo

Comments (7)

Sebanisu avatar Sebanisu commented on May 14, 2024

I thought I fixed this but i just ran it in linux and realized the function that wasn't working i was using WaveStream a = WaveFormatConversionStream.CreatePcmStream(raw); and that is the thing you are talking about. I did remove the need for waveout which I thought that was what this was referring too.

from openviii-monogame.

MaKiPL avatar MaKiPL commented on May 14, 2024

Yeah, that's mostly because PCMs are Windows natively supported. NAudio passes the PCM stream probably to IDirectSoundBuffer that doesn't exist on Linux. Recently I was working with FFMpeg. My idea is to use that instead of NAudio and let Monogame play the pre-converted sound, but FFMpeg is unmanaged type, so that might need a lot of marshaling. This will be for sure something I'll be working on after I finish battle stage camera + monster rendering

from openviii-monogame.

Sebanisu avatar Sebanisu commented on May 14, 2024

I think my class can be made to read these and convert to pcm. After I got it to run on Linux I am planning to take a look at it.

from openviii-monogame.

Sebanisu avatar Sebanisu commented on May 14, 2024

From what I gather if I don't pass data that will play in vlc or something it won't work. So I've been trying to learn how to format the raw adpcm wave data with a header in hopes that players will play it. using http://wiki.ffrtt.ru/index.php/FF8/FileFormat_FMT and http://icculus.org/SDL_sound/downloads/external_documentation/wavecomp.htm for reference and your working code. Maybe i should save a file using naudio and see what it does differently.

from openviii-monogame.

Sebanisu avatar Sebanisu commented on May 14, 2024

http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html and this http://www.cplusplus.com/forum/beginner/166954/ kinda helped. Got code that write wav files now. woo! there still compressed. I think now I can swap the filestream for a memory stream then send that data to ffmpeg to decode it for playback. None of the software understood what it was without a properly formatted header.

from openviii-monogame.

Sebanisu avatar Sebanisu commented on May 14, 2024

Okay I have sound playback working on linux. But, it's kinda a hack. I currently need to write the adpcm files to valid RIFF wav files. Then read then into ffmpeg the normal way. I had issues like I hard coded stereo and 44100 or 48000. So if anything was mono or another sample rate it wouldn't work. Decode() function didn't work with any files that were more than one frame per packet. Most of the adpcm files were multiple frames per packet. I still want to load the sound from memory instead of using the hard drive.

from openviii-monogame.

Sebanisu avatar Sebanisu commented on May 14, 2024

Okay I have something functional that doesn't write wav files to play them. I'll close this and do a pull request. Might need optimizations. It plays in linux but it's a bit delayed on my virtualbox instance.

from openviii-monogame.

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.