• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.coremedia.iso.boxes.apple;
2 
3 /**
4  * Beats per minute.
5  */
6 public final class AppleTempBox extends AbstractAppleMetaDataBox {
7     public static final String TYPE = "tmpo";
8 
9 
AppleTempBox()10     public AppleTempBox() {
11         super(TYPE);
12         appleDataBox = AppleDataBox.getUint16AppleDataBox();
13     }
14 
15 
getTempo()16     public int getTempo() {
17         return appleDataBox.getData()[1];
18     }
19 
setTempo(int tempo)20     public void setTempo(int tempo) {
21         appleDataBox = new AppleDataBox();
22         appleDataBox.setVersion(0);
23         appleDataBox.setFlags(21);
24         appleDataBox.setFourBytes(new byte[4]);
25         appleDataBox.setData(new byte[]{0, (byte) (tempo & 0xFF)});
26 
27     }
28 }