public static void main(String[] args) throws IOException { try (FileInputStream fis = new FileInputStream(args[0])) { try (HSLFSlideShow ppt = new HSLFSlideShow(fis)) { HSLFSoundData[] sounds = ppt.getSoundData(); for (HSLFSlide slide : ppt.getSlides()) { for (HSLFShape shape : slide.getShapes()) { int soundRef = getSoundReference(shape); if (soundRef == -1) continue; System.out.println("Slide[" + slide.getSlideNumber() + "], shape[" + shape.getShapeId() + "], soundRef: " + soundRef); System.out.println(" " + sounds[soundRef].getSoundName()); System.out.println(" " + sounds[soundRef].getSoundType()); } } } } }
HSLFSoundData[] sound = ppt.getSoundData(); for (HSLFSoundData aSound : sound) {