Skip to content
This repository was archived by the owner on Mar 22, 2026. It is now read-only.
This repository was archived by the owner on Mar 22, 2026. It is now read-only.

al_isSoundFilename returns true for even when '.ogg' is not in fname #11

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. al_isSoundFilename('lol.png')

Loading 'lol.png' isn't a problem because loadAssets checks al_isImgFilename 
first then if false checks al_isSoundFilename however if you tried to load 
'lol.bmp' (for whatever reason) it would try to decode it as audio data.

I'm sure the fix is to just change

        function al_isSoundFilename(fname)
        {
                return  fname.indexOf('.ogg') != -1 ||
                                fname.indexOf('.ogg') != -1 ||
                                fname.indexOf('.ogg') != -1 != -1;
        };

to

        function al_isSoundFilename(fname)
        {
                return  fname.indexOf('.ogg') != -1;
        };

Original issue reported on code.google.com by team.los...@gmail.com on 19 Jul 2013 at 4:04

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions