title: Android : NDK : Superpowered Open failed: ENOENT (No such file or directory) Error
body: <p>Hello I am trying to play audio.wav from internal storage using Superpowered::AdvancedAudioPlayer but NDK always through the Open failed: ENOENT (No such file or directory) exception.
  Code:</p>
  <p>//-----------------Java---------------------------------------------------------------------------------</p>
  <pre><code> String path = Environment.getExternalStorageDirectory().getAbsolutePath() + &quot;/MyFolder/&quot;;
          String myfile = path + &quot;filename&quot; + &quot;.mp3&quot;;
  
  
  
  if (samplerateString == null) samplerateString = &quot;48000&quot;;
          if (buffersizeString == null) buffersizeString = &quot;480&quot;;
           samplerate = Integer.parseInt(samplerateString);
           buffersize = Integer.parseInt(buffersizeString);
  </code></pre>
  <p>//-----------------Cpp------------------------------------------------------------------------------------</p>
  <pre><code>SoundEffects1(samplerate,     // sampling rate
                          buffersize,     // buffer size
                          myfile,        // path to .apk package
                          fileAoffset,    // offset (start) of file A in the APK
                          fileAlength,    // length of file A
                          fileBoffset,    // offset (start) of file B in the APK
                          fileBlength,     // length of file B
                          myfile,
                          myfile
              );
  
  Extern &quot;C&quot;
  JNIEXPORT void JNICALL
  Java_com_example_superpoweredandroidtest_Dashboard_SoundEffects1(
          JNIEnv *env,
          jobject __unused ob,
          jint samplerate,
          jint buffersize,
          jstring apkPath,
          jint fileAoffset,
          jint fileAlength,
          jint fileBoffset,
          jint fileBlength,
          jstring file1Path,
          jstring file2Path
  ){
      const char *path = env-&gt;GetStringUTFChars(apkPath, JNI_FALSE);
  
      const char *file1Name = env-&gt;GetStringUTFChars(file1Path, JNI_FALSE);
      const char *file2Name = env-&gt;GetStringUTFChars(file2Path, JNI_FALSE);
  
  
      __android_log_print(ANDROID_LOG_DEBUG, APPNAME, &quot;SoundEffects JNI Constructor %s&quot;,file1Name);
      soundEffects = new SoundEffects((unsigned int)samplerate, (unsigned int)buffersize,
                                      path, fileAoffset, fileAlength, fileBoffset, fileBlength,file1Name,file2Name);
  
   /*   env-&gt;ReleaseStringUTFChars(file1Path, file1Name);
      env-&gt;ReleaseStringUTFChars(file2Path, file2Name);
   */   env-&gt;ReleaseStringUTFChars(apkPath, path);
  }
  
  
  
  SoundEffects::SoundEffects (
          unsigned int samplerate, // device native sample rate
          unsigned int buffersize, // device native buffer size
          const char *path,        // path to APK package
          int fileAoffset,         // offset of file A in APK
          int fileAlength,         // length of file A
          int fileBoffset,         // offset of file B in APK
          int fileBlength,
          const char *file1Path,
          const char *file2Path
  ) : activeFx(0), numPlayersLoaded(0), crossFaderPosition(0.0f), volB(0.0f), volA(1.0f * headroom)
  {
  
      initializeSDK();
  
      playerA = new Superpowered::AdvancedAudioPlayer(samplerate, 0);
      playerB = new Superpowered::AdvancedAudioPlayer(samplerate, 0);
      roll = new Superpowered::Roll(samplerate);
      filter = new Superpowered::Filter(Superpowered::Resonant_Lowpass, samplerate);
      flanger = new Superpowered::Flanger(samplerate);
      filter-&gt;resonance = 0.1f;
  
  
    //  stereoBuffer = (float *) memalign(16, (buffersize + 16) * sizeof(float) * 2);
  
  
    //  __android_log_print(ANDROID_LOG_DEBUG, APPNAME, &quot;file===&gt; %s&quot;,path);
  
  
  
  //----------------------------------------------------------------------------------------------
      std::fopen(path, &quot;r&quot;);
  
      __android_log_print(ANDROID_LOG_DEBUG, APPNAME, &quot;SoundEffects Cpp Constructor %s&quot;,path);
        playerA-&gt;open(path);
   //   playerB-&gt;open(path);
  
      playerA-&gt;play();
   //-------------------working---------------------------------------------------------------------------
  
  
  
      //     playerA-&gt;open(path, fileAoffset, fileAlength);
  //        playerB-&gt;open(path, fileBoffset, fileBlength);
  
  
      // Initialize audio engine and pass callback function.
      output = new SuperpoweredAndroidAudioIO (
              samplerate,                     // device native sample rate
              buffersize,                     // device native buffer size
              false,                          // enableInput
              true,                           // enableOutput
              audioProcessing,                // audio callback function
              this,                           // clientData
              -1,                             // inputStreamType (-1 = default)
              SL_ANDROID_STREAM_MEDIA         // outputStreamType (-1 = default)
      );
  
  }
  
  void SoundEffects::initializeSDK() const {
      Superpowered::Initialize(
              &quot;ExampleLicenseKey-WillExpire-OnNextUpdate&quot;,
              false, // enableAudioAnalysis (using SuperpoweredAnalyzer, SuperpoweredLiveAnalyzer, SuperpoweredWaveform or SuperpoweredBandpassFilterbank)
              false, // enableFFTAndFrequencyDomain (using SuperpoweredFrequencyDomain, SuperpoweredFFTComplex, SuperpoweredFFTReal or SuperpoweredPolarFFT)
              false, // enableAudioTimeStretching (using SuperpoweredTimeStretching)
              true,  // enableAudioEffects (using any SuperpoweredFX class)
              true,  // enableAudioPlayerAndDecoder (using SuperpoweredAdvancedAudioPlayer or SuperpoweredDecoder)
              false, // enableCryptographics (using Superpowered::RSAPublicKey, Superpowered::RSAPrivateKey, Superpowered::hasher or Superpowered::AES)
              false  // enableNetworking (using Superpowered::httpRequest)
      );
  }
  </code></pre>