Sets the audio application.

@param string $app The audio application to set.

@return \React\Promise\Promise
5235
public function setAudioApplication($app)
    {
        $deferred = new Deferred();

        $legal = ['voip', 'audio', 'lowdelay'];

        if (false === array_search($app, $legal)) {
            $deferred->reject(new \InvalidArgumentException("{$app} is not a valid option. Valid options are: ".trim(implode(', ', $legal), ', ')));

            return $deferred->promise();
        }

        if ($this->speaking) {
            $deferred->reject(new \Exception('Cannot change audio application while playing.'));

            return $deferred->promise();
        }

        $this->audioApplication = $app;

        $deferred->resolve();

        return $deferred->promise();
    }
1330487
protected function setConfiguration($app)
    {

        if (isset($app['guzzle.base_uri'])) {
            $this->configuration['base_uri'] = $app['guzzle.base_uri'];
        }
        if (isset($app['guzzle.timeout'])) {
            $this->configuration['timeout'] = $app['guzzle.timeout'];
        }
        if (isset($app['guzzle.debug'])) {
            $this->configuration['debug'] = $app['guzzle.debug'];
        }
        if (isset($app['guzzle.request_options']) && is_array($app['guzzle.request_options'])) {
            foreach ($app['guzzle.request_options'] as $valueName => $value) {
                $this->configuration[$valueName] = $value;
            }
        }
    }
1261623
public function boot (Application $app) {
        if (isset($app[self::NS . ".default_args"]) && is_array($app[self::NS . ".default_args"])) {
            $this -> getPreserialiser($app) -> setDefaultArgs($app[self::NS . ".default_args"]);
        } else {
        }
    }
496808
public static function console($app)
  {
    if (Filesystem::isDirectory(Self::$dir . DIRECTORY_SEPARATOR . 'Commands')) {
      $app->craftsman->load(Self::$dir . DIRECTORY_SEPARATOR . 'Commands');
    }
  }
84157
public function bootstrap(Application $app)
    {
        /** @var Container $container */
        $container = $app->getContainer();

        $container->share('app', $app);
        $container->alias('app', Application::class);
        $container->alias('app', ApplicationInterface::class);

        $container->share('container', $container);

        $container->share('kernel.http', function () use ($container) {
            return $container->get(Kernel::class);
        });
        $container->alias('kernel.http', KernelInterface::class);

        $container->alias('router', Router::class);
        $container->alias('dispatcher', Dispatcher::class);
    }
910148
public static function bindTranslator($app)
    {
        //1. Bind the translation line loader.
        static::bindLoader($app);

        //2. Bind the translator.
        $app->singleton('translator', function ($app) {
            // When registering the translator component, we'll need to set the default
            // locale as well as the fallback locale. So, we'll grab the application
            // configuration so we can easily get both of these values from there.
            $trans = new Translator(
                $app['translation.loader'], $app['config']['app.locale']
            );

            $trans->setFallback($app['config']['app.fallback_locale']);

            return $trans;
        });
    }
129017
public static function factory(string $src): Audio
    {
        $audio = new Audio();
        $audio->src = $src;
        return $audio;
    }
940431
public function refreshApplication($app = null)
    {
        $this->app = $app instanceof Application ? $app : $this->createApplication();
    }
756400
public function getProgram($program)
    {
        $programId = Utilities::getEntityId(
            $program,
            'WindowsAzure\MediaServices\Models\Program'
        );

        return Program::createFromOptions($this->_getEntity("Programs('{$programId}')"));
    }
308621
public function setInstance(Container $app)
    {
        $app->instance('app', $app);
        $app->instance(Container::class, $app);

        if ($this->framework === 'lumen') {
            $app->instance(LumenApplication::class, $app);
        }

        Container::setInstance($app);
        Context::setApp($app);
        Facade::clearResolvedInstances();
        Facade::setFacadeApplication($app);
    }
527707
protected function bindContainer(Application $app)
    {
        $this->app->when(PasswordUsageTracker::class)->needs('$maxReuse')->give(function () {
            return $this->app['config']->get('concrete.user.password.reuse.track', 5);
        });

        $this->app->bindShared('user/registration', function () use ($app) {
            return $app->make('Concrete\Core\User\RegistrationService');
        });
        $this->app->bindShared('user/avatar', function () use ($app) {
            return $app->make('Concrete\Core\User\Avatar\AvatarService');
        });
        $this->app->bindShared('user/status', function () use ($app) {
            return $app->make('Concrete\Core\User\StatusService');
        });
        $this->app->bind('Concrete\Core\User\RegistrationServiceInterface', function () use ($app) {
            return $app->make('user/registration');
        });
        $this->app->bind('Concrete\Core\User\StatusServiceInterface', function () use ($app) {
            return $app->make('user/status');
        });
        $this->app->bind('Concrete\Core\User\Avatar\AvatarServiceInterface', function () use ($app) {
            return $app->make('user/avatar');
        });
    }
300121
public static function wake_app( $app )
	{
		static::$runtime_class = $app;
		\CCFinder::bind( $app, static::$paths['app'].$app.EXT );
		
		// run the application wake
		$response = $app::wake();
		
		// when the application wake returns an response we display it
		if ( $response instanceof CCResponse ) {
			if ( static::$config->send_app_wake_response ) {
				$response->send( true ); die;	
			}
		}
		
		$response = null;
		
		// run the environment wake
		if ( method_exists( $app, 'wake_'.static::$environment ) )
		{
			$response = call_user_func( $app.'::wake_'.static::$environment );
			
			// when the application env wake returns an response we display it
			if ( $response instanceof CCResponse ) {
				if ( static::$config->send_app_wake_response ) {
					$response->send( true ); die;	
				}
			}
		}
		
		// add routes from the app
		CCRouter::on( $app::routes() );
	}
437915
public function setAudioEncoding($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\AudioEncoding::class);
        $this->audio_encoding = $var;

        return $this;
    }
661883
public function setAudioEncoding($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\OutputAudioEncoding::class);
        $this->audio_encoding = $var;

        return $this;
    }
534515
public function getDefaultOption(string $app)
    {
        if($this->option($app)) {
            return $this->option($app);
        }

        if(!isset($this->defaultsOptions[$app])) {
            throw new \Exception('Option '.$app.' is not configured');
        }

        return $this->defaultsOptions[$app];
    }
771306
public function setApplication($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\Application::class);
        $this->application = $var;

        return $this;
    }
1304681
protected function setPodiumLogTarget($app)
    {
        $dbTarget = new DbTarget;
        $dbTarget->logTable = '{{%podium_log}}';
        $dbTarget->categories = ['bizley\podium\*'];
        $dbTarget->logVars = [];
        $app->log->targets['podium'] = $dbTarget;
    }