Macbook Airでラジオの電波を出すという記事はありましたが、普通のコンピューターでもできると主張していたのでやってみました。
まず、GitHubのレポジトリからソースコードをダウンロードします。
Windows環境を用いましたが、書いてある通り というコマンドを実行すると大量のstd::threadが宣言されてないなどのエラーが出ました。
そこで、mingw-std-threadsをダウンロードし、
// SYSTEM BUS RADIO
// https://github.com/fulldecent/system-bus-radio
// Copyright 2016 William Entriken
// C++11 port by Ryou Ezoe
#include
#include
#include
#include
#include
#include
#include
// SYSTEM BUS RADIO
// https://github.com/fulldecent/system-bus-radio
// Copyright 2016 William Entriken
// C++11 port by Ryou Ezoe
#include
#include
#include
#include
#include
#include
#include
そして、Makefileのデータにインクルードディレクトリの追加オプションを追加し、ソースファイルを書き換えたものにした というコマンドでコンパイルしました。
すると、さらにfprintf関連のエラーやunique_lockなどが宣言されていないエラーが出たので、cstdioとmutexのincludeを追加し、
// SYSTEM BUS RADIO
// https://github.com/fulldecent/system-bus-radio
// Copyright 2016 William Entriken
// C++11 port by Ryou Ezoe
#include
#include
#include
#include
#include
#include
#include
#include
#include
実行は、ドキュメントに書かれている通りの を実行すると再びコンパイルしようとしてエラーが出たので、
普通にコンパイルして生成されたgmain.exeを実行しました。
結果
- このプログラムを実行している間AMラジオで1000kHzくらいと1600kHzくらいに2000Hzくらいの信号を観測できたが、音階はわからなかった。
- なぜか時々止まる。
- BOINCの計算を実行している時に実行すると多分確実に最初から止まる。
The MIT License (MIT)
Copyright (c) 2016 William Entriken
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.