minor fixes
This commit is contained in:
parent
a5fe64fa2c
commit
84ede8af45
|
|
@ -65,8 +65,7 @@ namespace kiwano
|
|||
Close();
|
||||
}
|
||||
|
||||
Transcoder transcoder;
|
||||
HRESULT hr = transcoder.LoadMediaFile(file_path);
|
||||
HRESULT hr = transcoder_.LoadMediaFile(file_path);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
|
@ -74,7 +73,7 @@ namespace kiwano
|
|||
return false;
|
||||
}
|
||||
|
||||
hr = Audio::GetInstance()->CreateVoice(&voice_, transcoder.GetBuffer().format);
|
||||
hr = Audio::GetInstance()->CreateVoice(&voice_, transcoder_.GetBuffer().format);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Close();
|
||||
|
|
@ -94,8 +93,7 @@ namespace kiwano
|
|||
Close();
|
||||
}
|
||||
|
||||
Transcoder transcoder;
|
||||
HRESULT hr = transcoder.LoadMediaResource(res);
|
||||
HRESULT hr = transcoder_.LoadMediaResource(res);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
|
@ -103,7 +101,7 @@ namespace kiwano
|
|||
return false;
|
||||
}
|
||||
|
||||
hr = Audio::GetInstance()->CreateVoice(&voice_, transcoder.GetBuffer().format);
|
||||
hr = Audio::GetInstance()->CreateVoice(&voice_, transcoder_.GetBuffer().format);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
Close();
|
||||
|
|
|
|||
|
|
@ -127,7 +127,16 @@ namespace kiwano
|
|||
}
|
||||
|
||||
debug_text_->SetText(ss.str());
|
||||
SetSize(Size{ 20 + debug_text_->GetSize().x, 20 + debug_text_->GetSize().y });
|
||||
|
||||
if (debug_text_->GetWidth() > GetWidth() - 20)
|
||||
{
|
||||
SetWidth(20 + debug_text_->GetWidth());
|
||||
}
|
||||
|
||||
if (debug_text_->GetHeight() > GetHeight() - 20)
|
||||
{
|
||||
SetHeight(20 + debug_text_->GetHeight());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue