{"provider_url":"https://hatena.blog","blog_title":"xyk blog","author_url":"https://blog.hatena.ne.jp/xyk/","author_name":"xyk","categories":[],"blog_url":"https://xyk.hatenablog.com/","title":"Swift\u3067AVAudioPlayer\u3092\u4f7f\u3063\u3066\u30b5\u30a6\u30f3\u30c9\u30d5\u30a1\u30a4\u30eb\u3092\u518d\u751f\u3059\u308b","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxyk.hatenablog.com%2Fentry%2F2017%2F02%2F21%2F110103\" title=\"Swift\u3067AVAudioPlayer\u3092\u4f7f\u3063\u3066\u30b5\u30a6\u30f3\u30c9\u30d5\u30a1\u30a4\u30eb\u3092\u518d\u751f\u3059\u308b - xyk blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","type":"rich","provider_name":"Hatena Blog","description":"\u74b0\u5883: Swift3 \u524d\u56de\u306fAudioServicesPlaySystemSound\u3067\u30b5\u30a6\u30f3\u30c9\u30d5\u30a1\u30a4\u30eb\u3092\u518d\u751f\u3057\u305f\u304c\u3001\u4eca\u56de\u306fAVAudioPlayer\u3092\u4f7f\u3063\u3066\u518d\u751f\u3059\u308b\u4f8b\u3002 AVAudioPlayer\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u5f37\u53c2\u7167\u3059\u308b\u3002 import AVFoundation var audioPlayer: AVAudioPlayer? func playSound() { do { self.audioPlayer?.stop() self.audioPlayer = try AVAudioPlayer(contentsOf: Bundle.main.url(forResource: \"pico\", \u2026","published":"2017-02-21 11:01:03","height":"190","image_url":null,"url":"https://xyk.hatenablog.com/entry/2017/02/21/110103","width":"100%"}