Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: experimental/conways_life/audio/audio_player.h

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/conways_life/about.html ('k') | experimental/conways_life/audio/audio_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/conways_life/audio/audio_player.h
diff --git a/experimental/conways_life/audio/audio_player.h b/experimental/conways_life/audio/audio_player.h
deleted file mode 100644
index 001ee5a3c8903cce0417502b3103e57c0e354d05..0000000000000000000000000000000000000000
--- a/experimental/conways_life/audio/audio_player.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2011 The Native Client Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef AUDIO_PLAYER_H_
-#define AUDIO_PLAYER_H_
-
-#include "experimental/conways_life/threading/pthread_ext.h"
-#include "experimental/conways_life/web_resource_loader.h"
-#include "ppapi/cpp/completion_callback.h"
-
-namespace pp {
-class Audio;
-class Instance;
-}
-
-namespace audio {
-
-class AudioSource;
-
-// Play audio from various audio sources. Usage:
-//
-// AudioPlayer player(instance);
-// AudioSource* source = <create an sudio source>
-// player.AssignAudioSource(source);
-// player.Play();
-class AudioPlayer {
- public:
- explicit AudioPlayer(pp::Instance* instance);
- ~AudioPlayer();
-
- // Assign an audio source to this player. The player owns the audio source and
- // is responsible for deleting it when done. Returns true if successful, and
- // false otherwise (e.g. the source is not playable through this player).
- void AssignAudioSource(AudioSource* source);
-
- // Play audio from the sound source. This is an asynchronous call that returns
- // immediately. Fails silently if the sound source is not ready.
- void Play();
- // Stop playing.
- void Stop();
-
- // Indicates whether this player instance can play a sound.
- bool IsReady() const;
-
- private:
- // Disallow copy and assigment.
- AudioPlayer(const AudioPlayer&);
- AudioPlayer& operator=(const AudioPlayer&);
-
- // Pepper audio callback function.
- static void AudioCallback(void* sample_buffer,
- uint32_t buffer_size_in_bytes,
- void* user_data);
-
- // Internal versions of Play/Stop that only run on the main thread.
- void InternalPlay(int32_t result);
- void InternalStop(int32_t result);
-
- // Clear (delete) the audio objects.
- void ClearAudioSource();
- void ClearPepperAudio();
- // Create the pepper audio for the given sopurce. Return true on success.
- bool CreatePepperAudio();
-
- AudioSource* audio_source_;
- size_t playback_offset_;
- pp::Audio* pp_audio_;
- pp::Instance* instance_; // Weak reference.
-
- pp::CompletionCallbackFactory<AudioPlayer, threading::RefCount> factory_;
- pthread_mutex_t mutex_;
-};
-
-} // namespace audio
-#endif // AUDIO_PLAYER_H_
« no previous file with comments | « experimental/conways_life/about.html ('k') | experimental/conways_life/audio/audio_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698