Commit 59c3b95c by lenz su

音频接收bug

parent c6f16130
...@@ -529,6 +529,7 @@ void hid_thread::run() ...@@ -529,6 +529,7 @@ void hid_thread::run()
} }
if(pUsbFram1->head == 0x44332233) { if(pUsbFram1->head == 0x44332233) {
if(pUsbFram1->length==1012){ if(pUsbFram1->length==1012){
if(bufferlength>0){ if(bufferlength>0){
bufferlength=0; bufferlength=0;
...@@ -536,7 +537,6 @@ void hid_thread::run() ...@@ -536,7 +537,6 @@ void hid_thread::run()
memcpy(pData ,pUsbFram1->buff, 1012); memcpy(pData ,pUsbFram1->buff, 1012);
bufferlength+=pUsbFram1->length; bufferlength+=pUsbFram1->length;
cout<<"play add 1012"<<endl; cout<<"play add 1012"<<endl;
continue;
} }
if(pUsbFram1->length==908){ if(pUsbFram1->length==908){
...@@ -565,8 +565,6 @@ void hid_thread::run() ...@@ -565,8 +565,6 @@ void hid_thread::run()
memcpy(pData ,pUsbFram2->buff, 1012); memcpy(pData ,pUsbFram2->buff, 1012);
bufferlength+=pUsbFram2->length; bufferlength+=pUsbFram2->length;
cout<<"play add 1012"<<endl; cout<<"play add 1012"<<endl;
continue;
} }
if(pUsbFram2->length==908){ if(pUsbFram2->length==908){
if(bufferlength==1012){ if(bufferlength==1012){
...@@ -577,9 +575,7 @@ void hid_thread::run() ...@@ -577,9 +575,7 @@ void hid_thread::run()
hr=pRenderClient->GetBuffer(480, &playData); hr=pRenderClient->GetBuffer(480, &playData);
memcpy(playData ,pData, 1920); memcpy(playData ,pData, 1920);
hr= pRenderClient->ReleaseBuffer(480, flags); hr= pRenderClient->ReleaseBuffer(480, flags);
cout<<"play wanle"<<endl; cout<<"play wanle"<<endl;
} }
bufferlength=0; bufferlength=0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment