Extract iPod Library raw PCM samples and play with sound effects

后端 未结 4 1970
清歌不尽
清歌不尽 2020-12-04 15:47

I am trying to extract raw PCM samples from an MP3 in the iPod Library so that I can play the song and manipulate the pitch, tempo, and apply sound effects (such as filters)

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 16:28

    For the song duration, I believe you can simply query the song Asset thusly:

    float songTimeInSeconds = CMTimeGetSeconds(songAsset.duration);
        int songMinutes = (int)(songTimeInSeconds/60.);
        int songSeconds = (int)(songTimeInSeconds - 60.0*songMinutes);
    

提交回复
热议问题