ã¯ããã¦ã®YaneSDK.NETãã®ï¼
ä»åã¯CDDAã§ããCDDAãSoundåæ§ãã½ã¼ã¹ãè¦ãã¨ããåããã¨æãã¾ãã
以ä¸ã¯ãç°¡æCDãã¬ã¤ã¤ã¼ã§ãã
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using YS = Yanesdk.Sound; namespace Sample6 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } YS.CDDA cd; private void Form1_Load(object sender, EventArgs e) { cd = new YS.CDDA(); // ããã©ã«ãã®CDãã©ã¤ãã使ã cd.Open(0); // ãã©ãã¯çªå·ããªã¹ãã«è¿½å for (int i = 0; i < cd.GetTracks(); ++i) listBox1.Items.Add(i); } private void button1_Click(object sender, EventArgs e) { if (listBox1.SelectedItem != null) // æå®ãããã©ãã¯ãæ¼å¥(0ããéå§) cd.PlayTrack*1 // ä¸æåæ¢ cd.Pause(); else // åé cd.Resume(); } private void button4_Click(object sender, EventArgs e) { // ã¤ã¸ã§ã¯ã cd.Eject(); } } }
ããã§YaneSDKã使ã£ããã¼å ¥åãæç»ããã¬ã¼ã ã¬ã¼ãããµã¦ã³ã(CDDAå«ã)ãä¸éãè¦ã¾ãããä¸å¿ãããã ãã§ãã²ã¼ã ã¯ä½ãã¾ãããYaneSDKã¯ã¿ã¹ã¯ã·ã¹ãã ãã·ã¼ã³ç®¡çãªã©ã²ã¼ã ãä½æããããã®ãããé«åº¦ãªæ©è½ãæã£ã¦ãã¾ãããã ãæ®å¿µãªãããç§ã¯ã²ã¼ã ããã°ã©ãã³ã°ã«ã¤ãã¦ã¯ç´ 人ãªã®ã§ããããä¸æã解説ãããã¨ãåºæ¥ã¾ããã詳ããã¯ãä»å¾å ¬éãããã§ãããããããããããã®Live Lectureãè¦ã¦ãã ãããã£ã¨ããããåºãåã«éãããã¨ã«ãã¾ãã(^^;
*1:int)listBox1.SelectedItem); } private void button2_Click(object sender, EventArgs e) { // æ¼å¥ãæ¢ãã cd.Stop(); } private void button3_Click(object sender, EventArgs e) { if (cd.IsPlaying(