Package javax.sound.sampled

Examples of javax.sound.sampled.AudioFormat.properties()


            // "title" String title of this file
            // "copyright" String copyright message
            // "date" Date date of the recording or release
            // "comment" String an arbitrary text

            for (Entry<String, Object> entry : format.properties().entrySet()) {
                metadata.set(entry.getKey(), entry.getValue().toString());
            }
        } catch (UnsupportedAudioFileException e) {
            // There is no way to know whether this exception was
            // caused by the document being corrupted or by the format
View Full Code Here


            // "comment" String an arbitrary text

            for (Entry<String, Object> entry : fileFormat.properties().entrySet()) {
                metadata.set(entry.getKey(), entry.getValue().toString());
            }
            for (Entry<String, Object> entry : audioFormat.properties().entrySet()) {
                metadata.set(entry.getKey(), entry.getValue().toString());
            }
        } catch (UnsupportedAudioFileException e) {
            // There is no way to know whether this exception was
            // caused by the document being corrupted or by the format
View Full Code Here

                    messages += ", ";
                }
                messages += msgs.getMessage("NO_AUDIO_PROPERTIES", null);
            } else {
                Map mp3 = baseFileFormat.properties();
                Map audio = baseFormat.properties();
                if (mp3 == null) {
                    System.out.println("insert: SKIPPED: " + name + "(no baseFormat.properties()");
                    return;
                }
View Full Code Here

        assertEquals(2, format.getSampleSizeInBits());
        assertEquals(3, format.getChannels());
        assertEquals(4, format.getFrameSize());
        assertEquals(5f, format.getFrameRate());
        assertTrue(format.isBigEndian());
        assertTrue(format.properties().isEmpty());

        HashMap<String, Object> prop = new HashMap<String, Object>();
        prop.put("bitrate", Integer.valueOf(100));
        prop.put("vbr", Boolean.TRUE);
        format = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 5f, 4, 3, 2,
View Full Code Here

        assertEquals(4, format.getSampleSizeInBits());
        assertEquals(3, format.getChannels());
        assertEquals(2, format.getFrameSize());
        assertEquals(1f, format.getFrameRate());
        assertFalse(format.isBigEndian());
        assertEquals(2, format.properties().size());
        assertEquals(Integer.valueOf(100), format.properties().get("bitrate"));
        assertEquals(Boolean.TRUE, format.properties().get("vbr"));
        try {
            format.properties().put("aa", 1);
            fail("No expected UnsupportedOperationException");
View Full Code Here

        assertEquals(3, format.getChannels());
        assertEquals(2, format.getFrameSize());
        assertEquals(1f, format.getFrameRate());
        assertFalse(format.isBigEndian());
        assertEquals(2, format.properties().size());
        assertEquals(Integer.valueOf(100), format.properties().get("bitrate"));
        assertEquals(Boolean.TRUE, format.properties().get("vbr"));
        try {
            format.properties().put("aa", 1);
            fail("No expected UnsupportedOperationException");
        } catch (UnsupportedOperationException expected) {
View Full Code Here

        assertEquals(2, format.getFrameSize());
        assertEquals(1f, format.getFrameRate());
        assertFalse(format.isBigEndian());
        assertEquals(2, format.properties().size());
        assertEquals(Integer.valueOf(100), format.properties().get("bitrate"));
        assertEquals(Boolean.TRUE, format.properties().get("vbr"));
        try {
            format.properties().put("aa", 1);
            fail("No expected UnsupportedOperationException");
        } catch (UnsupportedOperationException expected) {
        }
View Full Code Here

        assertFalse(format.isBigEndian());
        assertEquals(2, format.properties().size());
        assertEquals(Integer.valueOf(100), format.properties().get("bitrate"));
        assertEquals(Boolean.TRUE, format.properties().get("vbr"));
        try {
            format.properties().put("aa", 1);
            fail("No expected UnsupportedOperationException");
        } catch (UnsupportedOperationException expected) {
        }

        format = new AudioFormat(1f, 10, 2, true, false);
View Full Code Here

        assertEquals(10, format.getSampleSizeInBits());
        assertEquals(2, format.getChannels());
        assertEquals(4, format.getFrameSize());
        assertEquals(1f, format.getFrameRate());
        assertFalse(format.isBigEndian());
        assertTrue(format.properties().isEmpty());

    }

    public void testMatches() {
        AudioFormat format;
View Full Code Here

                // "title" String title of this file
                // "copyright" String copyright message
                // "date" Date date of the recording or release
                // "comment" String an arbitrary text

                for (Entry<String, Object> entry : format.properties()
                        .entrySet()) {
                    metadata.set(entry.getKey(), entry.getValue().toString());
                }

            } catch (UnsupportedAudioFileException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.