C ++特定的声音输出?(C++ Specific Sound Output? [closed])
我想把电路连接到我的电脑,它使用音频输出作为AC电流,通过某些频率,然后将其整流为几个LED,因此,如果我编写一个程序,让您创建特定模式和LED组合被点亮时,它会输出特定的频率声音。
如何使用C ++以特定频率播放声音?
可能?
I want to hook a circuit up to my computer, which uses the audio output as an AC current, passes certain frequencies, then rectifies it to a few LEDs, so if I write a program that lets you create a specific pattern and combination of LEDs to be lit, it would output specific frequency sounds.
How do I play a sound at a specific frequency using C++?
Possible?
原文:https://stackoverflow.com/questions/5738603
最满意答案
2013年11月更新:
按照rajibchowdhury的回答 (upvoted),建议的
git rm
是删除索引中指定子模块的特殊条目 (“特殊模式”160000
“的”文件夹“)。如果在
.gitmodule
没有引用该特殊的入口路径 (如原始问题中的“Classes/Support/Three20
”),则需要将其删除,以避免“No submodule mapping found in .gitmodules for path
“ 错误信息。您可以检查引用子模块的索引中的所有条目:
git ls-files --stage | grep 160000
原始答案(2010年11月)
您是否正确声明了您的初始子模块? (即,如我的旧答案所述 ,尽管你的
.gitmodule
有一些看起来很好的路径),但是最后没有任何尾部'/'。这个线程提到:
从新鲜的克隆运行'git submodule init'时你会得到相同的错误吗?
如果是这样,你有什么问题。如果没有子模块,请删除
.gitmodules
,以及对.git / config中的子模块的任何引用,并确保Pikimal目录中没有.git
目录。
如果这样做可以解决问题,请在巡航工作副本上检查并执行相同操作。显然,不要删除你的主要的
.gitmodules
文件,而是在你的工作树中查看其他额外的.gitmodules
文件。
仍然在“不正确的子模块初始化”的主题中, Jefromi提到实际上是gitlinks的子模块。
看到“ Git - 如何跟踪未跟踪的内容 ”,看看如何将这样一个目录转换成一个真正的子模块。Following rajibchowdhury's answer (upvoted), use
git rm
command which is advised is for removing the special entry in the index indicating a submodule (a 'folder' with a special mode160000
).If that special entry path isn't referenced in the
.gitmodule
(like 'Classes/Support/Three20
' in the original question), then you need to remove it, in order to avoid the "No submodule mapping found in.gitmodules
for path" error message.You can check all the entries in the index which are referencing submodules:
git ls-files --stage | grep 160000
Previous answer (November 2010)
It is possible that you haven't declared your initial submodule correctly (i.e. without any tail '/' at the end, as described in my old answer, even though your
.gitmodule
has paths which looks ok in it).This thread mentions:
do you get the same error when running 'git submodule init' from a fresh clone?
If so, you have something wrong.If you have no submodules, delete
.gitmodules
, and any references to submodules in .git/config, and ensure the Pikimal dir does not have a.git
dir in it.
If that fixes the problem, check in and do the same on your cruise working copy.Obviously, don't delete your main
.gitmodules
file, but look after other extra.gitmodules
files in your working tree.
Still in the topic of "incorrect submodule initialization", Jefromi mentions submodules which actually are gitlinks.
See How to track untracked content? in order to convert such a directory to a real submodule.
相关问答
更多-
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
Git仍然认为mysubmodule是一个子模块,因为它被记录在特殊模式“160000”的索引中。 有关更多信息,请参见“ 最初只需要git子模块更新 ”。 要检查,如在这个答案 ,你可以做一个: $ git ls-tree HEAD mysubmodule 160000 commit c0f065504bb0e8cfa2b107e975bb9dc5a34b0398 mysubmodule 这不取决于.gitmodule文件的存在,或者依赖于.gitmodule的内容。 您需要首先从索引中删除该 ...
-
确保.git/config中没有submodule部分。 如果有的话,删除它们。 做git rm --cached
。 Ensure that there are no submodule sections in .git/config. If there are, remove them. Do git rm --cached . -
在.gitmodule中找不到不是子模块的路径的子模块映射(No submodule mapping found in .gitmodule for a path that's not a submodule)[2023-09-04]
2013年11月更新: 按照rajibchowdhury的回答 (upvoted),建议的git rm是删除索引中指定子模块的特殊条目 (“特殊模式” 160000 “的”文件夹“)。 如果在.gitmodule没有引用该特殊的入口路径 (如原始问题中的“ Classes/Support/Three20 ”),则需要将其删除,以避免“ No submodule mapping found in .gitmodules for path “ 错误信息。 您可以检查引用子模块的索引中的所有条目: git ls- ... -
Git子模块不会删除(Git Submodule Won't Delete)[2023-10-22]
您的命令没有删除.git/modules/ng/css/lib/submodule-name 首先删除该子文件夹(位于.git repo文件夹内部), 确保你的第二个git submodule add没有重新引入.gitmodules (如果是的话,先删除它) 然后再次尝试添加您的子模块。 Your commands did not delete .git/modules/ng/css/lib/submodule-name Do delete that subfolder first (internal t ... -
我在StackOverflow的另一个问题上找到了一个很好的解决方案: Git子模块URL不包括用户名? 您可以使用 [submodule foosub] path = foosub url = ./../foosub 定义相对于用于项目的URL的URL。 例如,如果您的项目URL为myuser@myserver.com/git/project,并且您的子模块URL为myuser@myserver.com/git/foosub,则配置应该有效。 当然,如果子模块位于与项目不同的服务器上,它就无法工作。 现 ...
-
什么是'脏'子模块?(What is a 'dirty' Submodule?)[2022-11-10]
这里的术语“脏”意味着与Git中其他地方相同:有问题的回购已跟踪文件(先前已提交的文件),这些文件具有尚未提交的修改,和/或存在新的未跟踪文件。 在子模块的ignore = dirty设置的上下文中,这意味着如果子模块是脏的(即,如果它跟踪了具有尚未提交的修改的文件和/或新的未跟踪文件),则将忽略这些更改。 不会被忽略的是签出提交的差异,例如,父项目指向提交C但子模块当前已签出提交F 这些是子模块的可能状态,以及父项目中设置为ignore = dirty : 子模块具有与父项目中记录的相同的提交,工作目录是 ... -
尝试初始化子模块时'致命:找不到子模块路径的url'错误('fatal: No url found for submodule path' error when trying to init submodule)[2023-11-23]
子模块路径可能不以斜杠结尾。 path=library/ 是一个无效的配置,而不是你可以: path=library Submodule paths may not end in a slash. path=library/ is an invalid configuration, instead you can have: path=library -
解决了。 在我的凭证中,我使用的是直接SSH密钥(选项“直接输入”),而不是放入文件中。 我只是将密钥(公共和私有)放在〜/ .ssh中,并将我的凭据更改为选项“From the Jenkins master~ / .ssh”。 问题是子模块没有使用我为主存储库指定的凭证,它试图使用默认的ssh密钥(.ssh / id_rsa)。 另一个解决方案是将-i my_key传递给git子模块步骤(如果你的密钥不在默认路径中,则只需要这个(〜/ .ssh / id_rsa)) 另外,不要忘记给你的密钥授予正确的权限 ...
-
您可以使用heroku-repo插件重置应用程序的repo: $ heroku plugins:install https://github.com/heroku/heroku-repo.git $ heroku repo:reset -a APP 然后你可以再次部署: $ git push .... You can use the heroku-repo plugin to reset the repo for the app: $ heroku plugins:install https://git ...