Getting sound files from Assets sub-directory returns 0 [SOLVED]


#1

Hello all,

Could anyone help with the correct way of getting the .wav files from asset folder, this is returning zero length-

  private void loadSounds() {

    try {
        soundNames = mAssets.list(SOUNDS_FOLDER);
        Log.i(TAG, "Found " + soundNames.length + " sounds");
    } catch (IOException ioe) {
        Log.e(TAG, "Could not list assets", ioe);
    }

    for(String fileName: soundNames){
        String assetPath = SOUNDS_FOLDER + "/" + fileName;
        Sound sound = new Sound(assetPath);
        mSounds.add(sound);
    }
}

and this below is the folder structure -

EDIT - turns out asset folder was in wrong lcoation.

Many thanks!