Loads the sounds for key from the config in
<code>&lt;packagePath&gt;/sound.properties</code>
499275
public byte[][] load (String packagePath, String key)
        throws IOException
    {
        String[] paths = getPaths(packagePath, key);
        if (paths == null) {
            log.warning("No such sound", "key", key);
            return null;
        }

        byte[][] data = new byte[paths.length][];
        String bundle = getBundle(packagePath);
        for (int ii = 0; ii < paths.length; ii++) {
            data[ii] = loadClipData(bundle, paths[ii]);
        }
        return data;
    }
477822
public void load(Configuration config)
	{
		String comment = "";
		for (String c : comments)
		{
			if (MalisisCore.isClient())
				comment += I18n.format(c) + " ";
			else
				comment += c + " ";
		}

		property = config.get(category, key, writeValue(defaultValue), comment, type);
		value = readValue(property.getString());
		if (value == null)
			throw new NullPointerException("readPropertyValue should not return null!");
	}
3690
@Override
    public List<String> getPackages() {
        List<String> list = new ArrayList<>();

        Consumer<JsonArray> reader = array -> {
            if ((array != null && !array.isEmpty())) {
                for (int i = 0; i < array.size(); i++) {
                    list.add(array.getString(i));
                }
            }
        };

        JsonArray resources = config.getJsonArray(CONFIG_RESOURCES, null);
        JsonArray packages = config.getJsonArray(CONFIG_PACKAGES, null);

        reader.accept(resources);
        reader.accept(packages);

        return list;
    }
688924
private void load() {
        InputStream propertiesInputStream = null;
        try {
            propertiesInputStream = propertiesInputStream();
            if (propertiesInputStream == null) {
                throw new IllegalArgumentException("The properties file could not be loaded!");
            }
            properties.load(propertiesInputStream);
        } catch (IOException e) {
            LOGGER.error("Can't load properties", e);
        } finally {
            try {
                if (propertiesInputStream != null) {
                    propertiesInputStream.close();
                }
            } catch (IOException e) {
                LOGGER.error("Can't close the properties InputStream", e);
            }
        }
    }
128001
void initConfigs(String propertiesAbsoluteClassPath) {
        this.propertiesAbsoluteClassPath = propertiesAbsoluteClassPath;
        this.propertiesFilePath = ResourceUtil.getAbsolutePath(propertiesAbsoluteClassPath);
        loadConfigs();
    }
29986
public static Properties loadProperties(String path){
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        InputStream in = null;
        try {
            in = cl.getResourceAsStream(path);

            Properties properties = new Properties();
            properties.load(in);

            return properties;

        } catch(IOException ex){
            return null;

        } finally {
            IOUtil.closeQuietly(in);
        }
    }
23269
function(sounds) {
          //console.log("SOUNDS", typeof sounds, sounds )
          sounds = JSON.parse( sounds )
          filename = sounds.results[0].name
          var id = sounds.results[0].id

          if (typeof Freesound.loaded[filename] === 'undefined') {

            freesound.getSound( id, function( val ){ 
              var request = new XMLHttpRequest(),
                  dict    = JSON.parse( val ),
                  path    = dict.previews['preview-hq-mp3']

              //Gibber.log("now downloading " + filename + ", " + sounds.sounds[0].duration + " seconds in length")
              request.open('GET', path, true) //"?&api_key=" + freesound.apiKey, true);
              request.responseType = 'arraybuffer';
              //request.withCredentials = true;
              request.onload = function( v ) {
                onload(request)
              };
              request.send();

              console.log( 'freesound path:', path, request )
            }, null )
          } else {
            sampler.buffer = Freesound.loaded[filename];
            sampler.filename = filename;
            sampler.bufferLength = sampler.buffer.length;
            sampler.isLoaded = true;
            sampler.end = sampler.bufferLength;
            sampler.setBuffer(sampler.buffer);
            sampler.setPhase(sampler.bufferLength);

            sampler.send(Master, 1)
            if (callback) {
              callback()
            }
          }
        }
252958
public Audio getMOD(String ref, InputStream in) throws IOException {
		if (!soundWorks) {
			return new NullAudio();
		}
		if (!inited) {
			throw new RuntimeException("Can't load sounds until SoundStore is init(). Use the container init() method.");
		}
		if (deferred) {
			return new DeferredSound(ref, in, DeferredSound.MOD);
		}
		
		return new MODSound(this, in);
	}
142983
private static Properties loadWithNormalMode(final String propertyFilePath)
            throws Exception {

        Properties props = new Properties();
        props.load(new InputStreamReader(new FileInputStream(propertyFilePath), "utf-8"));
        return props;
    }
780461
public void loadClassPath() throws IOException
    {
        Class<?> dClass    = this.getClass();
        CodeSource codeSrc = this.getClass().getProtectionDomain().getCodeSource();
        if ( codeSrc == null ) {
            return;
        }
        
        String codePath = codeSrc.getLocation().getPath();
        if ( codePath.toLowerCase().endsWith(".jar") ) {
            ZipInputStream zip = new ZipInputStream(codeSrc.getLocation().openStream());
            while ( true ) {
                ZipEntry e = zip.getNextEntry();
                if ( e == null ) {
                    break;
                }
                
                String fileName = e.getName();
                if ( fileName.endsWith(".lex") 
                        && fileName.startsWith("lexicon/lex-") ) {
                    load(dClass.getResourceAsStream("/"+fileName));
                }
            }
        } else {
            //now, the classpath is an IDE directory 
            //  like eclipse ./bin or maven ./target/classes/
            loadDirectory(codePath+"/lexicon");
        }
    }
1210900
public void openConfig(String path) {

        Properties properties = new Properties();
        try {
            properties.load(new FileInputStream(path));
        } catch (IOException ex) {
            JOptionPane.showMessageDialog(this, "Problems reading the properties file",
                    "Error", JOptionPane.ERROR_MESSAGE);
        }
        // read datasets
        this.jTextFieldProcess.setText(properties.getProperty("processors"));
        this.jTextFieldTask.setText(properties.getProperty("task"));
        try {
            this.currentTask = (MainTask) ClassOption.cliStringToObject(
                    this.jTextFieldTask.getText(), MainTask.class, null);
        } catch (Exception ex) {
            Logger.getLogger(TaskManagerTabPanel.class.getName()).log(Level.SEVERE, null, ex);
        }
        this.jTextFieldDir.setText(properties.getProperty("ResultsDir"));
        this.resultsPath = this.jTextFieldDir.getText();
        String[] streamShortNames = properties.getProperty("streamShortNames").split(",");
        String[] streamCommand = properties.getProperty("streamCommand").split(",");
        String[] algShortNames = properties.getProperty("algorithmShortNames").split(",");
        String[] algorithmCommand = properties.getProperty("algorithmCommand").split(",");
        cleanTables();
        for (int i = 0; i < streamShortNames.length; i++) {
            this.streamModel.addRow(new Object[]{streamCommand[i], streamShortNames[i]});
        }
        for (int i = 0; i < algShortNames.length; i++) {
            this.algoritmModel.addRow(new Object[]{algorithmCommand[i], algShortNames[i]});
        }

    }
505438
public String getString(String key) {
		if (key == null || key.isEmpty()) {
			return null;
		}
		String property = null;
		for (ConfigurationSource configurationSource : configurationSources) {
			property = configurationSource.getValue(key);
			if (property != null) {
				break;
			}
		}
		return property;
	}
1299085
def load(self, path):
        
        (folder, filename) = os.path.split(path)
        (name, extension) = os.path.splitext(filename)
        return Sound(name, Waveform.load(path))
495615
private void loadProperties(String propFileName) {
		if (propFileName != null) {
			loadProperties(getClass().getResourceAsStream(propFileName), propFileName);
		}
	}
837806
public static Properties loadProperties(String propertyFilePath){
		Properties prop = new Properties();
		InputStream is = null;
		ClassLoader cl = Thread.currentThread().getContextClassLoader();
		try {
			is = cl.getResourceAsStream(propertyFilePath);
			Assert.notNull(is, "Failed to obtain InputStream for " + propertyFilePath);
			prop.load(is);
			resolveSystemPropertyPlaceholders(prop);
		} 
		catch (Exception e) {
			throw new IllegalStateException("Failed to load configuration properties: " + propertyFilePath, e);
		} 
		finally {
			try {
				is.close();
			} catch (Exception e2) {
				// ignore
			}
		}
		return prop;
	}
509030
public void init() {
		if (inited) {
			return;
		}
		Log.info("Initialising sounds..");
		inited = true;
		
		AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
				try {
					AL.create();
					soundWorks = true;
					sounds = true;
					music = true;
					Log.info("- Sound works");
				} catch (Exception e) {
					Log.error("Sound initialisation failure.");
					Log.error(e);
					soundWorks = false;
					sounds = false;
					music = false;
				}
				
				return null;
            }});
		
		if (soundWorks) {
			sourceCount = 0;
			sources = BufferUtils.createIntBuffer(maxSources);
			while (AL10.alGetError() == AL10.AL_NO_ERROR) {
				IntBuffer temp = BufferUtils.createIntBuffer(1);
				
				try {
					AL10.alGenSources(temp);
				
					if (AL10.alGetError() == AL10.AL_NO_ERROR) {
						sourceCount++;
						sources.put(temp.get(0));
						if (sourceCount > maxSources-1) {
							break;
						}
					} 
				} catch (OpenALException e) {
					// expected at the end
					break;
				}
			}
			Log.info("- "+sourceCount+" OpenAL source available");
		
			if (AL10.alGetError() != AL10.AL_NO_ERROR) {
				sounds = false;
				music = false;
				soundWorks = false;
				Log.error("- AL init failed");
			} else {
				FloatBuffer listenerOri = BufferUtils.createFloatBuffer(6).put(
						new float[] { 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f });
				FloatBuffer listenerVel = BufferUtils.createFloatBuffer(3).put(
						new float[] { 0.0f, 0.0f, 0.0f });
				FloatBuffer listenerPos = BufferUtils.createFloatBuffer(3).put(
						new float[] { 0.0f, 0.0f, 0.0f });
				listenerPos.flip();
				listenerVel.flip();
				listenerOri.flip();
				AL10.alListener(AL10.AL_POSITION, listenerPos);
				AL10.alListener(AL10.AL_VELOCITY, listenerVel);
				AL10.alListener(AL10.AL_ORIENTATION, listenerOri);
   			 
				Log.info("- Sounds source generated");
			}
		}
	}
90957
protected static void loadProps() {
        PropertiesManager.props = new Properties();
        try {
            String pfile = System.getProperty(PORTAL_PROPERTIES_FILE_SYSTEM_VARIABLE);
            if (pfile == null) {
                pfile = PORTAL_PROPERTIES_FILE_NAME;
            }
            PropertiesManager.props.load(PropertiesManager.class.getResourceAsStream(pfile));
        } catch (Throwable t) {
            log.error("Unable to read portal.properties file.", t);
        }
    }