iPhone SDK:Saving a streamed audio file to Documents folder

前端 未结 3 1985
旧巷少年郎
旧巷少年郎 2021-01-03 14:07

I want to save an audio file to the Documents folder of my application while one of the classes in my app is streaming it. How can I do this?

Is it possible to save

相关标签:
3条回答
  • 2021-01-03 14:21

    If you are using the NSURLConnection or CFNetwork to download the file you can save it in the connectionDidFinishLoading delegate.

    Take a look at Matt Gallaghers Streaming and playing an MP3 stream

    0 讨论(0)
  • 2021-01-03 14:29
    (void)applicationWillResignActive:(UIApplication *)application
    {
    
    }
    

    Write your code in the above method in App delegate file.

    0 讨论(0)
  • 2021-01-03 14:35

    If you want to clean up your partially saved file on exit,
    you could do worse than doing it from

    - (void)applicationWillTerminate:(UIApplication *)application

    in your app controller.

    0 讨论(0)
提交回复
热议问题