简体   繁体   English

如何在C ++中播放声音

[英]How a sound is played in c++

simple question i asked myself yesterday, if an os is multitask, it will be able to play sound and do other stuff at the same time, because of task managing right ? 我昨天问自己一个简单的问题,如果一个操作系统是多任务的,那么由于任务管理正确,它可以同时播放声音和做其他事情吗? But, why the sound is great and do not have any interference ? 但是,为什么声音很棒并且没有任何干扰?

thanks per avance 提前感谢

Not sure how this is related to c++, but when you play sound on a computer, it consumes resources by entering CPU cycles. 不确定这与c ++有什么关系,但是当您在计算机上播放声音时,它会通过输入CPU周期来消耗资源。 Sound is seemingly "great" because CPUs nowadays are much more capable, and the extra load has a negligible effect on system performance, and you don't have stutters due to depletion of resources. 声音似乎“很棒”,因为当今的CPU的功能更加强大,而且额外的负载对系统性能的影响可忽略不计,而且由于资源耗尽而不会造成卡顿现象。

If you are talking about signal interference, this is about circuit/PCB design, not about the OS or CPU scheduling. 如果您在谈论信号干扰,那是关于电路/ PCB设计,而不是关于OS或CPU调度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM