public Song(IntPtr songidPtr, Device device) { handle = new HandleRef(this, songidPtr); njb_songid_t songidRaw = (njb_songid_t)Marshal.PtrToStructure(songidPtr, typeof(njb_songid_t)); id = (int)songidRaw.trid; nframes = (int)songidRaw.nframes; this.device = device; }
public void Rescan() { int count; if(NJB_Discover(NJB_Glue_Get_Device_Array(), 0, out count) == -1) { throw new ApplicationException("Could not run NJB Discover"); } devices = new Device[count]; for(int i = 0; i < count; i++) { devices[i] = new Device(this, i); } }
public Song(Device device) : this(NJB_Songid_New(), device) { }