GithubHelp home page GithubHelp logo

OGG playback issues about fna HOT 4 CLOSED

QuarkRobot avatar QuarkRobot commented on August 16, 2024
OGG playback issues

from fna.

Comments (4)

flibitijibibo avatar flibitijibibo commented on August 16, 2024

What does the URI string actually look like? I don't know what PATH actually is. Did it work with XNA4?

from fna.

QuarkRobot avatar QuarkRobot commented on August 16, 2024

PATH = "C:\Users\RogerWilco\Documents\Lode Runner\MMR\MMR/MMR\bin\x86\Debug\DATA\CD_AUDIO.Ogg"

I never used the Song or Media Player in XNA4 so I've no idea, only that it worked a few FNA updates ago.

            string path = uri.ToString();
            Console.WriteLine("input: " + path);
            if (Uri.IsWellFormedUriString(path, UriKind.Absolute))
            {
                // If it's absolute, be sure we can actually get it...
                if (!uri.IsFile)
                {
                    throw new InvalidOperationException(
                        "Only local file URIs are supported for now"
                    );
                }
                path = uri.LocalPath;
                Console.WriteLine("output: " + path);
            }

            return new Song(path)
            {
                Name = name
            };

input:file:///C://Users//RogerWilco//Documents//Lode%20Runner//MMR//MMR//MMR//bin//x86//Debug//DATA//CD_AUDIO.Ogg"

output:C:\\Users\\RogerWilco\\Documents\\Lode%20Runner\\MMR\\MMR\\MMR\\bin\\x86\\Debug\\DATA\\CD_AUDIO.Ogg"

This causes the InvalidOperationException exception because the output path is not a proper file path. When the URI is created without any escaping:

input: file:///C:/Users/RogerWilco/Documents/Lode Runner/MMR/MMR/MMR/bin/x86/Debug/DATA/CD_AUDIO.Ogg" which also not a valid path.

from fna.

flibitijibibo avatar flibitijibibo commented on August 16, 2024

ed8cce5

from fna.

QuarkRobot avatar QuarkRobot commented on August 16, 2024

Works a treat, thank you.

from fna.

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.