Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の要件は次のとおりです。
iPod ライブラリから曲にアクセスして再生する必要があります (実行可能です)。Assets ライブラリを使用してこれを実装しましたが、その曲のクリップを取得できるように、プログラムでその曲をトリミングする必要があります。「Ringtone Designer」と呼ばれる、同じ機能を備えた 1 つのアプリケーションが既に App Store にあります。
曲の ALAsset を取得していると思います (最初から最後まで再生する方法を既に知っていると言っているため)。
ここで、抽出したい部分を選択するには、ALAsset でメソッド defaultRepresentation を呼び出してから、その ALAssetRepresentation-Object で getBytes:fromOffset:length:error: を呼び出します。
http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAsset_Class/Reference/Reference.html http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAssetRepresentation_Class/Reference/Reference.html#//apple_ref/doc/c_ref/ALAssetRepresentation
http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAsset_Class/Reference/Reference.html
http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAssetRepresentation_Class/Reference/Reference.html#//apple_ref/doc/c_ref/ALAssetRepresentation
曲がエンコードされている場合は、最初にデコードする必要がある場合があります。
幸運を!