Adds a resource to the queue of files to play.

@param loop if true, play this file in a loop if there's nothing else
on the queue
966927
public void queueResource (String bundle, String resource, boolean loop)
    {
        try {
            queueURL(new URL("resource://" + bundle + "/" + resource), loop);
        } catch (MalformedURLException e) {
            log.warning("Invalid resource url.", "resource", resource, e);
        }
    }
512024
public void play() {
        checkState();
        if (mState == STATE_PAUSED) {
            PlaybackService.resume(getContext(), mClientKey);
        } else if (mState == STATE_STOPPED) {
            SoundCloudTrack track = mPlayerPlaylist.getCurrentTrack();
            if (track != null) {
                PlaybackService.play(getContext(), mClientKey, track);
            } else {
                return;
            }
        }
        mState = STATE_PLAYING;
    }
936459
public void enqueue(String resourceFileName) throws IOException {
		File tmp = new File(path,resourceFileName);
		if(!tmp.isFile()) {
			tmp.createNewFile();
		}
	}
1106029
public void setResources(java.util.Collection<Resource> resources) {
        if (resources == null) {
            this.resources = null;
            return;
        }

        this.resources = new java.util.ArrayList<Resource>(resources);
    }
799323
public void addCreatedResource(Location location, Resource resource) {
        resourceList.add(resource);
        locationToResourceMap.put(location, resource);
    }
502455
public synchronized void enqueue(DownloadTask task) {
        taskList.add(task);
        Collections.sort(taskList);

        if (!paused && !looping) {
            looping = true;
            startNewLooper();
        }
    }
1246255
public static void playSound(String fileName, long offset, long length,
                                 boolean sync) {

        FileInputStream fis = null;
        try {
            if (player == null) {
                player = new MediaPlayer();
            }

            player.reset();
            fis = new FileInputStream(fileName);
            int available = fis.available();

            if (available < offset)
                return;

            if (length == -1 || length + offset > available) {
                length = available - offset;
            }

            player.setDataSource(fis.getFD(), offset, length);
            player.prepare();
            player.start();

            if (sync) {
                while (player.isPlaying()) {
                    Thread.sleep(30);
                }
            }

        } catch (Exception e) {
            Log.e(TAG, "", e);
        } finally {
            if (fis != null) {
                try {
                    fis.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }
596153
public function setLoop(LoopInterface $loop)
    {
        parent::setLoop($loop);
        foreach ($this->plugins as $plugin) {
            if (!($plugin instanceof LoopAwareInterface)) {
                continue;
            }

            $plugin->setLoop($loop);
        }
    }
116354
public void add(List<T> resources)
    {
        for(T resource : resources)
        {
            if(resource.getId() != null)
                ids.put(resource.getId(), resource);
            if(resource instanceof NamedResource)
                addName((NamedResource)resource);
        }
    }
1123074
public void addListener(Record record, FileListener listener)
    {
        record.doAddListener(listener);
        boolean bOldState = listener.setEnabledListener(false);      // To disable recursive forever loop!
        BaseListener nextListener = listener.setNextListener(null);     // Make sure this is the ONLY listener in the chain to get this call
        if (record.getEditMode() == Constants.EDIT_ADD)
        {
            boolean[] rgbModified = this.getRecord().getModified();
            listener.doNewRecord(DBConstants.DISPLAY);
            this.getRecord().setModified(rgbModified);   // Restore since doNew should not change modified fields.
        }
        else if ((record.getEditMode() == Constants.EDIT_IN_PROGRESS) || (record.getEditMode() == Constants.EDIT_CURRENT))
            listener.doValidRecord(DBConstants.DISPLAY);
        listener.setNextListener(nextListener);
        listener.setEnabledListener(bOldState);   // Renable the listener to eliminate echos
    }
1312152
function (processSound) {
    var found;
    var i;
    var sound;

    if (!this.loaded) {
      warn('Sound not loaded yet. It will be played once it finished loading');
      this.mustPlay = true;
      return;
    }

    found = false;
    this.isPlaying = true;
    for (i = 0; i < this.pool.children.length; i++) {
      sound = this.pool.children[i];
      if (!sound.isPlaying && sound.buffer && !found) {
        if (processSound) { processSound(sound); }
        sound.play();
        sound.isPaused = false;
        found = true;
        continue;
      }
    }

    if (!found) {
      warn('All the sounds are playing. If you need to play more sounds simultaneously ' +
           'consider increasing the size of pool with the `poolSize` attribute.', this.el);
      return;
    }

    this.mustPlay = false;
  }
447120
private void populateFileList(ResourceFileList list, File root, boolean recurse) 
	throws IOException {
		if(root.isDirectory()) {
			File[] files = root.listFiles();
			if(files != null) {
				for(File file : files) {
					if(file.isFile() && filter.accept(root, file.getName())) {
						ResourceFileLocation location = new ResourceFileLocation(
								file.getName(),file.getAbsolutePath());
						list.add(location);
					} else if(recurse && file.isDirectory()){
						populateFileList(list, file, recurse);
					}
				}
			}
		} else {
			LOGGER.warning(root.getAbsolutePath() +	" is not a directory.");
			return;
		}
	}
341696
public function setLoop($loop)
    {
        if (is_bool($loop) === true) {
            $this->loop = $loop;
        } else {
            $msg = "The 'loop' argument must be a boolean value, '" . gettype($loop) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
497014
private void addDatasourceIfNeeded(ServletRequest req)
            throws JspException
    {
        if (_match == null)
            return;

        for (int i = 0; i < _match.length; i++) {
            if (!_optionList.contains(_match[i])) {
                if (!_match[i].equals(NULL_VALUE))
                    addOption(req, _match[i], _match[i]);
            }
        }
    }
161237
public void setResources(java.util.Collection<String> resources) {
        if (resources == null) {
            this.resources = null;
            return;
        }

        this.resources = new java.util.ArrayList<String>(resources);
    }
182597
public void play ()
    {
        if (_state == AL10.AL_PLAYING) {
            log.warning("Tried to play stream already playing.");
            return;
        }
        if (_state == AL10.AL_INITIAL) {
            _qidx = _qlen = 0;
            queueBuffers(_buffers.length);
        }
        _source.play();
        _state = AL10.AL_PLAYING;
    }
252622
public Movie setLoop(final boolean loop)
    {
        getAttributes().setLoop(loop);

        if (null != m_video)
        {
            m_video.setLoop(loop);
        }
        return this;
    }