equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package com.sun.media.sound; |
26 package com.sun.media.sound; |
27 |
27 |
28 import javax.sound.sampled.AudioFileFormat; |
|
29 import javax.sound.sampled.AudioFormat; |
28 import javax.sound.sampled.AudioFormat; |
30 |
|
31 |
29 |
32 /** |
30 /** |
33 * AIFF file format. |
31 * AIFF file format. |
34 * |
32 * |
35 * @author Jan Borgersen |
33 * @author Jan Borgersen |
36 */ |
34 */ |
37 |
35 final class AiffFileFormat extends StandardFileFormat { |
38 final class AiffFileFormat extends AudioFileFormat { |
|
39 |
36 |
40 static final int AIFF_MAGIC = 1179603533; |
37 static final int AIFF_MAGIC = 1179603533; |
41 |
38 |
42 // for writing AIFF |
39 // for writing AIFF |
43 static final int AIFC_MAGIC = 0x41494643; // 'AIFC' |
40 static final int AIFC_MAGIC = 0x41494643; // 'AIFC' |
68 private final int commChunkSize=26; |
65 private final int commChunkSize=26; |
69 |
66 |
70 /** FVER chunk size in bytes, inclusive magic and length field */ |
67 /** FVER chunk size in bytes, inclusive magic and length field */ |
71 private final int fverChunkSize=0; |
68 private final int fverChunkSize=0; |
72 |
69 |
73 AiffFileFormat( AudioFileFormat aff ) { |
70 AiffFileFormat(final Type type, final long byteLength, |
74 this( aff.getType(), aff.getByteLength(), aff.getFormat(), aff.getFrameLength() ); |
71 final AudioFormat format, final long frameLength) { |
75 } |
|
76 |
|
77 AiffFileFormat(Type type, int byteLength, AudioFormat format, int frameLength) { |
|
78 super(type, byteLength, format, frameLength); |
72 super(type, byteLength, format, frameLength); |
79 } |
73 } |
80 |
74 |
81 int getHeaderSize() { |
75 int getHeaderSize() { |
82 return headerSize; |
76 return headerSize; |