• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
MusicTracks properties in java
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MusicTracks properties in java


  • Subject: MusicTracks properties in java
  • From: Gary Newby <email@hidden>
  • Date: Wed, 30 Jun 2004 10:11:33 +0900

Hi

i'm new to the Java/ Core Audio API, can anyone show me
how to correctly get and set a MusicTracks properties - i havent been able to
figure it out successfully from the docs - see below.

many thanks

Gary Newby


------------------

import java.util.*;
import java.io.*;
import com.apple.audio.toolbox.*;
import com.apple.audio.midi.*;
import com.apple.audio.util.*;
import com.apple.audio.*;

public class jMusicPlayer {

private static MusicPlayer mp;
private static MusicSequence ms;
private static MusicTrack destinationtrack;

public static void main (String[] args) {

try {

MusicPlayer mp = new MusicPlayer();
MusicSequence ms = new MusicSequence();

ms.loadSMF(new File("users/gary/desktop/drum.mid"));

CAMemoryObject loopnum = new CAMemoryObject (ms.getIndTrack(1).getPropertySize(4), false);

// *** im lost here........... i'm guessing the index of the loop info value is 4 (from docs)

ms.getIndTrack(1).getProperty(4, loopnum, ???));
ms.getIndTrack(1).setProperty(4, loopnum, 0);

//

mp.setSequence( ms );
mp.start();

} catch( Exception e ) {
e.printStackTrace( System.err );
}
}
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: [ANN] SpectrumAU public beta
  • Next by Date: Newbie - CoreAudio in Carbon
  • Previous by thread: [ANN] SpectrumAU public beta
  • Next by thread: Newbie - CoreAudio in Carbon
  • Index(es):
    • Date
    • Thread