TEST_F(Voe, unmute_after_call)
{
	int err;
	struct aucodec_param prm;
	struct auenc_state *aesp = NULL;
	struct audec_state *adsp = NULL;
	struct media_ctx *mctxp = NULL;
	const struct aucodec *ac;
	int pt = 96;
	int srate = 48000;
	bool muted;
    
	memset(&prm, 0, sizeof(prm));

	ac = aucodec_find(&aucodecl, "opus", 48000, 2);
    
	if (ac->enc_alloc){
		err = ac->enc_alloc(&aesp, &mctxp, ac, NULL, &prm,
                            NULL, NULL, NULL, NULL, NULL);
		ASSERT_EQ(0, err);
	}
    
	if (ac->dec_alloc){
		err = ac->dec_alloc(&adsp, &mctxp, ac, NULL, &prm,
                            NULL, NULL, NULL);
		ASSERT_EQ(0, err);
	}
    
	err = voe_get_mute(&muted);
	ASSERT_EQ(err, 0);
	ASSERT_EQ(muted, false);

	err = voe_set_mute(true);
	ASSERT_EQ(err, 0);
    
	err = voe_get_mute(&muted);
	ASSERT_EQ(err, 0);
	ASSERT_EQ(muted, true);
    
	mem_deref(aesp);
	mem_deref(adsp);

	err = voe_get_mute(&muted);
	ASSERT_EQ(err, 0);
	ASSERT_EQ(muted, false);
}
Пример #2
0
int flowmgr_get_mute(struct flowmgr *fm, bool *muted)
{
	int err = ENOSYS;
	(void)fm;

	err = voe_get_mute(muted);

	return err;
}